Guardian Procedure Calls Reference Manual
Returned Value
INT(32)
If room is <= 0D, ret-val indicates the number of bytes between the current stack pointer and
the stack limit. If room is > 0D, ret-val indicates the outcome of the operation and returns one
of these values:
Either the requested space already exists in the stack space or the stack space was successfully enlarged to
make enough room for the request.
0D
The request would have exceeded the maximum stack size.5D
The stack pointer is invalid.6D
The stack pointer does not address a main stack or a privileged stack.7D
The system was unable to allocate memory.36D
The system was unable to obtain swap space.43D
The Kernel Managed-Swap Facility (KMSF) was unable to obtain swap space.45D
Considerations
• If HEADROOM_ENSURE_ returns an error (not 0D), the stack is not enlarged.
• If HEADROOM_ENSURE_ is called from a user (nonprivileged) process, the main stack of the
process is the target. If the call is made from a privileged procedure, the privileged stack is
the target.
• The amount by which the stack is enlarged might be greater than the value specified in room.
The stack size is rounded up by a unit determined by the system.
Example
error := HEADROOM_ENSURE_ ( room );
692 Guardian Procedure Calls (H-K)