pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:8684: Inside #if defined(HAVE_SYS_MMAN_H)
     #ifdef HAVE_SYS_MMAN_H   #include <sys/mman.h>   #endif      #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)   #define MAP_ANONYMOUS MAP_ANON   #endif /* !MAP_ANONYMOUS && MAP_ANON */      #ifdef MAP_ANONYMOUS - static int type_stack_mmap, type_mark_stack_mmap; + static int type_stack_mmap, pike_type_mark_stack_mmap;   #endif      void init_types(void)   {    /* Initialize hashtable here. */    pike_type_hash = xcalloc(sizeof(struct pike_type *),    (PIKE_TYPE_HASH_SIZE+1));    pike_type_hash_size = PIKE_TYPE_HASH_SIZE;       /* if possible, use mmap with on-demand allocation */   #if defined(MAP_ANONYMOUS)    type_stack = mmap( NULL, sizeof(struct pike_type *)*PIKE_TYPE_STACK_SIZE,    PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE,0,0);    if( type_stack )    type_stack_mmap = 1;    pike_type_mark_stack = mmap( NULL, sizeof(struct pike_type **)*PIKE_TYPE_STACK_SIZE>>2,    PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);    if( pike_type_mark_stack ) -  type_mark_stack_mmap = 1; +  pike_type_mark_stack_mmap = 1;   #endif    if( !type_stack )    type_stack = xalloc(sizeof(struct pike_type *)*PIKE_TYPE_STACK_SIZE);    if( !pike_type_mark_stack )    pike_type_mark_stack = xalloc(sizeof(struct pike_type *)*PIKE_TYPE_STACK_SIZE);       Pike_compiler->type_stackp = type_stack;    Pike_compiler->pike_type_mark_stackp = pike_type_mark_stack;       int_type_string = CONSTTYPE(tInt); /* MUST come before string! */