HP3000-L Archives

November 1995, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Thu, 9 Nov 1995 11:47:13 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Dan asks:
> GetHeap and RtnHeap? And why are they undocumented?
 
Possibly because CLL didn't want non-Pascal programmers to use them?
(In Pascal, you'd typically do a "NEW (...)" instead)
 
> We have some legacy SPL code which uses them, but it's not at all obvious
> what exactly is going on. Does GetHeap really allocate a 'heap' in SPL? How
> does this Intrinsic actually work?
 
From the CSEQ Tool:
 
   CSEQ [2.0] - LPS Toolbox [A.01a]         (c) 1995 Lund Performance Solutions
 
   NM:
   Procedure getheap (
      region_ptr   : var    record  ;        {R26, @32 -> 32, align 32}
      region_size  : var    int16   ;        {R25, align 16}
      ok           : var    int16   )        {R24, align 16}
 
   CM:
   procedure GETHEAP (
      region_ptr           : ref   logical pointer,  ! Q - %6
      region_size          : ref   integer,          ! Q - %5
      ok                   : ref   logical);         ! Q - %4
 
 
In CM, GETHEAP allocates space in your DL-DB area of your CM stack.  Thus,
your CM heap and CM stack combined are limited to less than 64KB.
 
I assume the units in NM are bytes, and in CM are halfs (16-bits each).
 
I seem to recall that the NM GETHEAP was buggy, in that it blithely assumed
that your pointer was at a 32-bit aligned address (unlike most other
intrinsics that return 32-bit values).
 
--
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2