DEFINITION - FUNCTION
size& = AvailGPMem&(flags&) -- memory available in the GPM system pool
OPERATION
This function returns the amount of free memory according to the given
flags. Returning the largest continuous block is a slow operation.
ARGUMENTS
flags& -- a bit field specifying the size to return (see below)
RESULT
size& -- total free space remaining or the largest free block or the
overall size of the GPM system pool (see FLAGS below)
NOTES
AvailGPMem&(gpmF_Largest&) does a consistency check on the memory list.
The GPM system will panic with an error if any mismatch is noted.
FLAGS
The flags& defined in the include file memory.bi are bit-coded values,
hence they can easily combined by ORing or adding them:
gpmF_NoAdd& -- Return the size according to the current GP Memory
region, ignoring the amount which the GPM pool still
could be extended until reaching the maximum given
at init time.
The next two flags are mutually exclusive, without any of it this
function returns the total free space remaining:
gpmF_Largest& -- Return size of the largest continuous free memory
block, rather than total free size.
gpmF_Total& -- Don't return the free size, but the total size of the
GP Memory region.
SEE ALSO
Query GP Memory
Back to Function Reference