Dynamic Storage Allocation - Heap Pointer Initialization

From: Chris Grav (spamtrap_at_crayne.org)
Date: 10/16/04


Date: Sat, 16 Oct 2004 18:17:19 +0000 (UTC)

I need to create a simple dynamic storage allocation run-time library
(new & dispose routines). The model i use is COM.
The program code is loaded at the first block of the 64K and the stack
(with the activation records) is growing from the 64K to lower memory
addresses. My heap will exist in the rest of the memory starting exactly
after the program code.

Does anyone know a way to initialize the value of the heapptr, which
will be the address after the end of program code?

One idea is to put a label at the end of the segment, BUT this is not
good enough because we do not know if it will be there the real end of
the code after the linking the libraries.

Other ideas?

Thanks in advance