pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: main.c,v 1.88 2000/04/08 01:09:56 hubbe Exp $"); + RCSID("$Id: main.c,v 1.89 2000/10/01 08:53:34 hubbe Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "language.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/main.c:415: Inside #if defined(HAVE_GETRLIMIT) && defined(RLIMIT_STACK) and #if defined(RLIM_INFINITY)
  #ifdef RLIM_INFINITY    if(lim.rlim_cur == RLIM_INFINITY)    lim.rlim_cur=1024*1024*32;   #endif      #ifdef Pike_INITIAL_STACK_SIZE    if(lim.rlim_cur > Pike_INITIAL_STACK_SIZE)    lim.rlim_cur=Pike_INITIAL_STACK_SIZE;   #endif    + #if defined(__linux__) && defined(PIKE_THREADS) +  /* This is a really really *stupid* limit in glibc 2.x +  * which is not detectable since __pthread_initial_thread_bos +  * went static. On a stupidity-scale from 1-10, this rates a +  * solid 11. - Hubbe +  */ +  if(lim.rlim_cur > 2*1024*1024) lim.rlim_cur=2*1024*1024; + #endif +     stack_top += STACK_DIRECTION * lim.rlim_cur;      #ifdef HAVE_PTHREAD_INITIAL_THREAD_BOS    {    extern char * __pthread_initial_thread_bos;    /* Linux glibc threads are limited to a 4 Mb stack    * __pthread_initial_thread_bos is the actual limit    */       if(__pthread_initial_thread_bos &&