Chapter Contents |
Previous |
Next |
Compiling C and C++ Programs |
In SAS/C Release 6.50, defining the external integer
variable
_stkabv
in the
source program (example:
extern
int _stkabv = 1;
) will indicate to the library to allocate stack space
above the 16M line.
Note:
Setting the variable at run time will have no
effect; it must be initialized to 1 as shown.
However, some SAS/C library functions require their
stack space be allocated below the line due to their use of auto storage for
parameter lists and control blocks which still have a below-the-line requirement.
These library routines have been identified, and either modified to remove
the requirement, or changed to request that their own allocation of stack
space be located below the 16M line. Release 6.50 includes a compiler option
and a
CENTRY
macro parameter
to allow user code to request that its stack space be allocated below the
line even if the
_stkabv
variable is defined as non-zero.
A new option allows the library to release stack space
that is no longer needed. To free stack space, define the external integer
variable
_stkrels
(example:
extern int _stkrels = 1;
). This
tells the library that, on return from a function, if an entire stack segment
becomes unused, the segment should be returned to the operating system. This
option is useful in long running programs that contain code paths that can
occasionally become deeply nested, or in multi-tasking applications. Use of
_stkrels
and
_stkabv
guarantee that no stack space is allocated
below the line if none is required by an executing routine.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.