Specifications

Operating System Routines
COM$DRVDEALMEM
COM$DRVDEALMEM
Deallocates system dynamic memory.
Module
COMDRVSUB
Input
Location Contents
R0 Address of block to be deallocated
IRP$W_SIZE Size of block in bytes (must be at least 24 bytes
long)
Output
Location Contents
R0 through R11 Preserved
Synchronization
Drivers can call COM$DRVDEALMEM from any IPL. COM$DRVDEALMEM
executes at the caller’s IPL and returns control at that IPL. The caller retains
any spinlocks it held at the time of the call. If called at IPL$_SYNCH or higher,
the routine executes the fork process.
Description
COM$DRVDEALMEM calls EXE$DEANONPAGED to deallocate the buffer
specified by R0. If COM$DRVDEALMEM cannot deallocate memory at the
caller’s IPL, it transforms the block being deallocated into a fork block and
queues the block in the fork queue. The code that executes in the fork process
then jumps to EXE$DEANONPAGED.
If the buffer to be deallocated is less than FKB$C_LENGTH in size, or its
address is not aligned on a 16-byte boundary, COM$DRVDEALMEM issues a
BADDALRQSZ bugcheck.
3–5