The mi_stack_limit() function

The mi_stack_limit() function checks if the specified amount of space is available on the user stack.

Syntax

mi_smallint mi_stack_limit(mi_integer size);
size
The stack size, in bytes.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_stack_limit() function checks if the space available on the user stack is greater than size plus the stack margin. The user stack checked belongs to the current thread executing on the CPU VP.

Return values

0
There is sufficient amount of available space on the user stack.
-1
The size value exceeds available space on the user stack.