Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - __stackmin minimum free runtime stack space http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __stackmin          Minimum free runtime stack space
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   uint __stackmin

 Default
   65535.

 Description
   The __stackmin system variable contains the smallest amount
   of unused stack space during program execution. The value of __stackmin
   is set by the internal stack checking routine at the entry of each
   user-defined function call. The value of __stackmin is only meaningful
   if stack checking is not turned off by the -Gs compiler switch.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   // This example demonstrates how recursion exhausts the stack
   
   vardef static
      ulong nCalls := 0
   enddef
   
   proc Test_stackmin
   nCalls++
   if __stackmin % 1000 < 10
      ? __stackmin, nCalls   // display minimum stack and recursion depth
   endif
   Test_stackmin()           // recursive call that ends in an error
   endproc

   proc main
   Test_stackmin()
   endproc

See Also: -Gs stackavail()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson