Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> heapptr heap free space pointer pp 225</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 HEAPPTR                   Heap Free Space Pointer                    pp 225

 Syntax:  HeapPtr

 Type:    Untyped Pointer

 Form:    Pre-defined Variable

 Purpose: This is a pre-defined 32 bit pointer to free heap space.

 Notes:   At the start of program execution HeapPtr is set to the bottom
          of the stack segment.  The stack pointer is set to the top of the
          segment.  As new dynamic variables are allocated, the heap grows
          upward in memory.  HeapPtr is normalized to a segment address
          and an offset of $0..$F.

          The maximum size variable that can be allocated on the heap is
          65521 bytes.  This is $10000 les $000F.

          HeapPtr is a type-less pointer that is compatible with all
          pointer types.


 ----------------------------------------------------------------------------


 Usage:
       VAR
          Segment : Integer        ;  { Segment value       }
          Offset  : Integer        ;  { Offset value        }

       BEGIN
          Segment := Seg (HeapPtr) ;  { Get HeapPtr segment }
          Offset  := Ofs (HeapPtr) ;  { Get HeapPtr offset  }
       END.

See Also: FreeMem GetMem New Pointer Ptr

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson