CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-47
TNS CRE Traps and Exceptions
Querying Heap-Management Attributes
You can query the value of all the heap attributes listed in Table 2-5. However, the 
following six heap attributes can only be queried and not set: space size, space active, 
free blocks, free space, heap segments, and heap segment space.
The C syntax for the routine that queries heap-management attributes is:
int RTL_heap_getattribute_ ( int Attribute, size_t *Value ) ;
Attribute specifies the heap attribute.
Value references the data object to be assigned the attribute value. 
TNS CRE Traps and Exceptions 
This subsection describes how the TNS CRE handles run-time errors. It covers:
•
Errors in program logic (including arithmetic overflow)
•
Hardware traps (except arithmetic overflow)
•
Catastrophic errors
•
TNS CRE trap handler 
RTL^Heap^segments^max The number of flat extended 
segments that can be allocated 
subsequently. Default value: 0 Range 
of values: 0 to 32.
4D
RTL^Heap^space^size The heap space area size in bytes.  10D
RTL^Heap^space^active The number of bytes in the heap 
space area that are currently active, 
that is, the number of bytes that 
belong to allocated blocks or to free 
blocks that reside between allocated 
blocks. 
11D
RTL^Heap^free^blocks The count of the free space blocks 
currently present in the heap space 
area. 
12D
RTL^Heap^free^space The sum of the sizes in bytes of all 
free space blocks currently present in 
the heap space area.
13D
RTL^Heap^segments The number of flat extended 
segments already allocated.
14D
RTL^Heap^segment^space The number of bytes in flat extended 
segments.
15D
Table 2-5. Heap-Management Attributes for the High-Performance Heap Manager 
(page 2 of 2)
Attribute Name Definition and Default Value Attribute Value










