Carbon


StackSpace

Header: MacMemory.h Carbon status: Supported

Returns the amount of space between the bottom of the stack and the top of the application heap.

SInt32 StackSpace ();
function result

The current amount of stack space, in bytes, between the current stack pointer and the application heap.

DISCUSSION

Usually you determine the maximum amount of stack space needed before you ship your application. Thus this function is generally useful only during debugging to determine how big to make the stack. However, if your application calls a recursive function that conceivably could call itself many times, that function should keep track of the stack space and take appropriate action if it becomes too low.

Call the function MemError to get the result code. See “Result Codes”.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)