Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (P)
Guardian Procedure Calls Reference Manual522629-013
12-20
POOL_GETSPACE_PAGE_ Procedure (H-Series
RVUs Only)
block-size input
INT(32):value
is the size in bytes of the memory to be obtained from the pool. This value can
range from 1 byte through the available space in the pool. The block size of the
allocated block can be rounded up to retain the alignment of the pool.
error output
INT .EXT:ref:1
indicates the outcome of the call:
0 No error.
2 Required parameter missing.
4 Invalid size.
block-size is not within the valid range.
9 Corrupt pool header.
10 Unable to allocate space.
Considerations
POOL_GETSPACE_ and POOL_PUTSPACE_ do not check pool data structures on
each call. A process that destroys data structures or uses an incorrect address for a
parameter can fail on a call to POOL_GETSPACE_ or POOL_PUTSPACE_: a TNS
process can get an instruction failure trap (trap 1) or illegal address trap (trap 0); a
native process can receive a SIGILL or SIGSEGV signal.
Example
@pblock := POOL_GETSPACE_( pool, $UDBL( $LEN( pblock ) ) );
! get a pool block of PBLOCK size.
Related Programming Manual
For programming information about the POOL_GETSPACE_ memory-management
procedure, refer to the
Guardian Programmer’s Guide.
POOL_GETSPACE_PAGE_ Procedure (H-
Series RVUs Only)
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Note. There are additional considerations for privileged callers.