Guardian Procedure Calls Reference Manual

HEADROOM_ENSURE_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameter
Returned Value
Considerations
Example
Summary
NOTE: This procedure can be called only from a native process. Its pTAL syntax is declared only
in the EXTDECS0 file.
The HEADROOM_ENSURE_ procedure allows you to check that the current stack has enough room
for the needs of your process. The default value of 0D indicates that the main stack can grow to
1 MB in the TNS/R enviroment and to 2 MB in the TNS/E environment. Note there are two stacks
in the TNS/E environment: the memory stack and the RSE backing store. For most processes, the
default value is adequate. This procedure can help you, for example, when specifying parameters
for the PROCESS_LAUNCH_ procedure.
Syntax for C Programmers
#include <cextdecs(HEADROOM_ENSURE_)>
__int32_t HEADROOM_ENSURE_ ( __int32_t room );
CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
Syntax for TAL Programmers
ret-val := HEADROOM_ENSURE_ ( room ); ! i
Parameter
room
input
INT(32):value
in the TNS/R environment, specifies the additional space in bytes to be allocated to the stack
if room is > 0D. If room is <= 0D, HEADROOM_ENSURE_ returns the current headroom; that
is, the number of bytes between the current stack pointer and the limit of the stack. In the TNS/E
environment, specifies the minimum size of either the memory stack or the RSE backing store.
When room is <=0D, it is the size of the remaining memory stack (calculated as the difference
between the maximum stack and the used stack amount.)
HEADROOM_ENSURE_ Procedure 691