Guardian Programmer's Guide

Table Of Contents
Mixed Data Model Programming
Guardian Programmer’s Guide 421922-014
A - 3
Dynamic Memory Allocation in 64-bit Segments
notation it is bit <3>. SEGMENT_GETINFO_ assigns -1 to base-address for a
64-bit segment; it assigns -1 to segment-size if the size exceeds 31 bits.
SEGMENT_RESIZE64_
A 64-bit version of the existing RESIZESEGMENT procedure.
Additional procedures recognizing 64-bit segments are:
ADDRESS_DELIMIT64_
A 64-bit version of the existing ADDRESS_DELIMIT_ procedure.
REFPARAM_BOUNDSCHECK64_
A 64-bit version of the existing REFPARAM_BOUNDSCHECK_ procedure.
For more information on the SEGMENT_*64_ and related procedures, see Guardian
Procedure Calls Reference Manual. These procedures exist in the H06.20, J06.09 and
subsequent RVUs.
Dynamic Memory Allocation in 64-bit Segments
Dynamic allocation and de-allocation of space in a 64-bit segment can be
accomplished through use of the 64-bit pool routines. These routines have the
following advantages:
Much higher performance than traditional NSK pool management routines
Do not require that a pool be a contiguous block of virtual memory. A pool can be
grown by allocating an additional segment, then augmenting the pool to include
that segment
The 64-bit pool routines are:
POOL64_DEFINE_ defines a new pool
POOL64_GET_ allocates space from the pool
POOL64_PUT_ deallocates space form the pool
POOL64_GETINFO_ provides information about an existing pool
POOL64_RESIZE_ grows or shrinks a single-segment pool
POOL64_AUGMENT_ adds a potentially discontiguous memory area to a pool
POOL64_DIMINISH_ removes a memory area previously added by
POOL64_AUGMENT_
POOL64_CHECK_SHRINK_ determines if a POOL64_RESIZE_ or
POOL_DIMINISH_ call will succeed
POOL64_CHECK_ checks the integrity of a pool