pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret.c,v 1.343 2004/02/09 22:02:56 mast Exp $ + || $Id: interpret.c,v 1.344 2004/03/24 20:34:44 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.343 2004/02/09 22:02:56 mast Exp $"); + RCSID("$Id: interpret.c,v 1.344 2004/03/24 20:34:44 grubba Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h" - #include "language.h" +    #include "stralloc.h"   #include "constants.h"   #include "pike_macros.h"   #include "multiset.h"   #include "backend.h"   #include "operators.h"   #include "opcodes.h"   #include "main.h"   #include "lex.h"   #include "builtin_functions.h"
pike.git/src/interpret.c:199:    {    while(1)    {    fd=open("/dev/zero",O_RDONLY);    if(fd >= 0) break;    if(errno != EINTR)    {    Pike_interpreter.evaluator_stack=0;    Pike_interpreter.mark_stack=0;    goto use_malloc; + #define NEED_USE_MALLOC_LABEL    }    }    /* Don't keep this fd on exec() */    set_close_on_exec(fd, 1);    }   #endif      #define MMALLOC(X,Y) (Y *)mmap(0,X*sizeof(Y),PROT_READ|PROT_WRITE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS, fd, 0)       Pike_interpreter.evaluator_stack_malloced=0;    Pike_interpreter.mark_stack_malloced=0;    Pike_interpreter.evaluator_stack=MMALLOC(Pike_stack_size,struct svalue);    Pike_interpreter.mark_stack=MMALLOC(Pike_stack_size, struct svalue *);    if((char *)MAP_FAILED == (char *)Pike_interpreter.evaluator_stack) Pike_interpreter.evaluator_stack=0;    if((char *)MAP_FAILED == (char *)Pike_interpreter.mark_stack) Pike_interpreter.mark_stack=0;    -  + #ifdef NEED_USE_MALLOC_LABEL   use_malloc: -  + #endif /* NEED_USE_MALLOC_LABEL */    - #else + #else /* !USE_MMAP_FOR_STACK */    Pike_interpreter.evaluator_stack=0;    Pike_interpreter.mark_stack=0; - #endif + #endif /* USE_MMAP_FOR_STACK */       if(!Pike_interpreter.evaluator_stack)    {    Pike_interpreter.evaluator_stack=(struct svalue *)xalloc(Pike_stack_size*sizeof(struct svalue));    Pike_interpreter.evaluator_stack_malloced=1;    }       if(!Pike_interpreter.mark_stack)    {    Pike_interpreter.mark_stack=(struct svalue **)xalloc(Pike_stack_size*sizeof(struct svalue *));