Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (D-E)
Guardian Procedure Calls Reference Manual—522629-013
4-29
DEFINEPOOL Procedure
(Superseded by POOL_* Procedures)
1 Bounds error on pool-head
2 Bounds error on
pool
3 Invalid
pool-size
4
pool-head and pool overlap.
5
pool-head is not word-aligned.
6
pool is not word-aligned.
pool-head output
INT .EXT:ref:19
is a 19-word array to be used as the pool header; GETPOOL and PUTPOOL use
this array to manage the pool. An even-byte address must be specified.
pool input
INT .EXT:ref:*
specifies the address of the first word of the memory space to be used as the pool.
An even-byte address must be specified. The address of the actual beginning of
the pool might be adjusted for alignment.
pool-size input
INT(32):value
specifies the size of the pool in bytes. This number must be a multiple of 4 bytes
and cannot be less than 32 bytes or greater than 127.5 megabytes (133,693,440
bytes). The address of the end of the pool is always equal to the address specified
for the
pool parameter plus pool-size. Pool space overhead and adjustments
for alignment do not cause the pool to extend past this boundary.
Considerations
•
Stack addresses converted to extended addresses
If
pool-head or pool is in the user data stack, the TAL compiler automatically
converts data stack addresses to extended addresses.
•
Read-only segments
If you specify
pool-head or pool in an extended data segment that is allocated
as a read-only segment, DEFINEPOOL returns error 1 or 2 (bounds error on
pool-head or pool, respectively).
•
Dynamic memory allocation
Several Guardian procedures support the creation of memory pools and dynamic
allocation of variable-sized blocks from the pool. The calling program provides the
memory area to be used as the pool and then calls the DEFINEPOOL procedure to
Caution. If a privileged process calls DEFINEPOOL and supplies an odd-byte address for the
pool or the pool-head parameter, a processor halt results.