MFSH_SEGALLOC - Allocate a segment
Purpose
Allocate memory.
Calling Sequence
int far pascal MFSH_SEGALLOC(usFlag, cbSeg, pusSel)
unsigned short usFlag;
unsigned long cbSeg;
unsigned short far * pusSel;
Where
usFlag is set to 1 if the memory must be below the 1-meg boundary or 0 if
its location does not matter.
cbSeg contains the length of the segment.
pusSel is a pointer to a word in which the helper returns the selector of
the segment.
Returns
If no error is detected, a zero error code is returned. If an error is
detected, one of the following error codes is returned:
oERROR_NOT_ENOUGH_MEMORY
too much memory is allocated.
oERROR_PROTECTION_VIOLATION
the supplied address is invalid.
oERROR_INVALID_PARAMETER
either the supplied flag or length is invalid.
Remarks
This function allocates memory with the following attributes:
oAllocated from the GDT
oNon-swappable
Memory not allocated specifically below the 1-Meg boundary may be given to
the FSD by passing the selectors through pMiniFSD (see MFS_INIT and
FS_INIT).
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs