The LazyBoy Library Manual - Memory

Note: Unlike many library functions, the memory management macros do not require the data segment to equal the code segment.

Basic memory management:

MemHeapCreate a managed memory HEAP in lower memory.
MemNewAllocate memory in the HEAP.
MemFreeRelease memory in the HEAP.
MemAvailGet size of largest free block in the HEAP.
MemUsedGet total size of used space in the HEAP.
MemUnusedGet total amount of free space in the HEAP.
MemSizeGet the amount of memory reserved for the HEAP.
MemErrorSet a callback function for HEAP error handling.

XMS memory management:

EMS memory management:

DOS memory functions:

DOS_AllocAllocate a DOS memory block.
DOS_ReleaseRelease a DOS memory block.
DOS_ResizeResize a DOS memory block.