CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-45
Using the Programmatic Heap-Management
Attributes
Guardian Commands to Enable Overwrite
To enable the overwrite released-space feature, use either the ADD DEFINE or the
PARAM command:
•
ADD DEFINE =_ERASE_ON_FREE_, CLASS MAP, FILE ON
This DEFINE activates the overwrite released-space feature for each
process subsequently initiated by that TACL session. Note that this DEFINE
influences processes and is propagated or suppressed according to the
rules for all DEFINEs.
•
PARAM -ERASE-ON-FREE- {ON|OFF}
The PARAM -ERASE-ON-FREE- can enable or disable the overwrite released-
space feature, and the PARAM takes precedence over the DEFINE
=_ERASE_ON_FREE_ when both are active. Thus, you can disable the overwrite
feature using the PARAM command even when the DEFINE
=_ERASE_ON_FREE_ is active.
OSS Commands to Enable Overwrite
Use either the ADD DEFINE or the EXPORT shell directive as follows:
•
add_define =_ERASE_ON_FREE_ class=MAP file=ON
This DEFINE activates the overwrite released space feature for each process
subsequently initiated. Note that this DEFINE influences processes and is
propagated or suppressed according to the rules for all DEFINEs.
•
export _ERASE_ON_FREE_={ON|OFF}
The environment variable _ERASE_ON_FREE_ can enable or disable the
overwrite released-space feature, and it takes precedence over the DEFINE
_ERASE_ON_FREE_ when both are active.
Using the Programmatic Heap-Management Attributes
Both the original and the high-performance heap managers enable you to set and
query certain attributes. Table 2-5, Heap-Management Attributes for the High-
Performance Heap Manager, on page 2-46, lists the attributes, their default values, and
their limits. For example, you can monitor and, to some extent, control the allocation of
flat extended segments performed by the heap manager. Table 2-5
lists the attributes
in the format used for pTAL and declared in the RTLDECS file. The format used for C
and C++, which is declared in the RTLDECH file, uses underscores (_) instead of
circumflexes (^) in the attribute names.
To query and set heap-management attributes, you use the
RTL_heap_getattribute_ and the RTL_heap_setattribute_ procedures,
which are defined in the RTLRDECS file for pTAL, and in the RTLDECH file for C and
C++.