The LazyBoy Library Manual - MemAvail

Part of the Memory Management group.

%imacro MemAvail 1
Prefers: DX:AX
Prefers: AX

Get the size of largest free block in the HEAP.

The return value will be 32-bit register pair value. However, if only a word is provided as a parameter and the largest block is greater than 65535 bytes, the value returned will be 65535.

Example:

    MemAvail dx:ax       ; get largest free block size
    MemAvail cx          ; get largest free block size

See also: MemSize, MemUnused, MemUsed and MemNew.