Guardian Procedure Calls Reference Manual

pool_options
input
INT(32)
The values are defined in kpool64.h for C and KPOOL64 for pTAL. The only value valid for
unprivileged callers is:
POOL64Default (0)
NOTE: The POOL64 procedures are designed for use in 64-bit address space. 32-bit address
space is a subset of 64-bit address space, so a 64-bit pool can occur in either 32-bit or 64-bit flat
segments. The POOL64_... and POOL32… procedures are not recommended for use in selectable
data segments. If any part of the pool is in a selectable segment, that segment must be in use
whenever any of these procedures are called. A pool cannot be split across multiple selectable
data segments.
Returned Value
INT(32)
Outcome of the call:
POOL64_OK0
Successful completion.
POOL64_BOUNDS3
The memory being defined as a pool is not within this user's address bounds.
POOL64_INVALIDSIZE4
The capacity is too small to contain the header and one element.
POOL64_ALIGN5
The address or capacity provided is not 16 byte aligned.
POOL64_INVALIDADDRESS20
Pool address is outside the acceptable address range.
POOL64_BADOPTION27
Invalid option value specified.
These values are defined in kpool64.h for C and KPOOL64 for pTAL.
Example
#include <kmem.h>
#include <kpool64.h>
#include <stdlib.h>
#include <stdio.h>
NSK_POOL64_PTR poolBase; /* base address of pool */
#define poolSize (1LL << 32) /* 4 GB (arbitrary) */
void heap64Init(void)
{
int16 error,detail;
error = SEGMENT_ALLOCATE64_(
1, /* segID */
poolSize,
, , /* fileName, len: unused */
&detail, /* error detail */
, /* pin: unused */
, /* segType: default */
960 Guardian Procedure Calls (P)