Guardian Procedure Calls Reference Manual

STACK_DEALLOCATE_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameter
Returned Value
Example
Summary
The STACK_DEALLOCATE_ procedure releases memory resources for a user stack that was allocated
using the STACK_ALLOCATE_ procedure. The stack specified by the stackaddr parameter must
have been allocated as a user stack in an earlier call to the STACK_ALLOCATE_ procedure or an
error is returned.
If the specified stack is used as a signal stack, it must be de-registered prior to calling the
STACK_DEALLOCATE_ procedure.
The STACK_DEALLOCATE_ procedure is a callable routine and is declared in kmem.h and KMEM.
NOTE: The STACK_DEALLOCATE_ procedure is supported on systems running H06.21 and later
H-series RVUs and J06.10 and later J-series RVUs. This procedure is not supported on G-series
RVUs.
Syntax for C Programmers
#include <kmem.h>
short STACK_DEALLOCATE_ ( void *stackaddr );
Syntax for TAL Programmers
?SOURCE KMEM
error := STACK_DEALLOCATE_ ( stackaddr ); ! i
The STACK_DEALLOCATE_ procedure is only supported in pTAL; it is not supported in TAL.
Parameter
stackaddr
input
EXTADDR:value
specifies the base address of the user stack to be deallocated.
Returned Value
INT
Outcome of the operation:
Operation was successful.0
The input parameter specified is not a valid user stack address.2
Failed to deallocate user stack; either the stack is currently in use, or the stack is an active signal stack.4
STACK_DEALLOCATE_ Procedure 1393