Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>stackavail() return size of available stack memory</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
stackavail()             Return Size of Available Stack Memory

 #include   <malloc.h>                   Required for declarations only

 unsigned   int stackavail(void);

    stackavail() returns the approximate number of bytes on the stack
    available for allocation.  They can be allocated by using alloca().

    Returns:    Approximate number of bytes available on the stack.

  -------------------------------- Example ---------------------------------

    The following statement reports the approximate number of bytes
    available for allocation on the stack:

            #include <malloc.h>
            #include <stdio.h>      /* for printf */

            main()
            {
                printf("%u bytes of stack space available\n",
                       stackavail());
            }

See Also: alloca()

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