Back to index

glibc  2.9
alloca_cutoff.c File Reference
#include <alloca.h>
#include <stdlib.h>
#include <sys/param.h>
#include <pthreadP.h>

Go to the source code of this file.


int __libc_alloca_cutoff (size_t size)

Function Documentation

Definition at line 27 of file alloca_cutoff.c.

  return size <= (MIN (__MAX_ALLOCA_CUTOFF,
                     THREAD_GETMEM (THREAD_SELF, stackblock_size) / 4
                     /* The main thread, before the thread library is
                       initialized, has zero in the stackblock_size
                       element.  Since it is the main thread we can
                       assume the maximum available stack space.  */
                     ?: __MAX_ALLOCA_CUTOFF * 4));