pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:2853:    }    }    dmalloc_set_mmap_template(Pike_compiler->new_program, m);    }   #endif   }      struct program *low_allocate_program(void)   {    struct program *p=alloc_program(); -  MEMSET(p, 0, sizeof(struct program)); +  memset(p, 0, sizeof(struct program));    p->flags|=PROGRAM_VIRGIN;    p->alignment_needed=1;       GC_ALLOC(p);    p->id=++current_program_id;    INIT_PIKE_MEMOBJ(p, T_PROGRAM);       DOUBLELINK(first_program, p);    ACCURATE_GETTIMEOFDAY(& p->timestamp);    return p;
pike.git/src/program.c:2959:    yyerror("Pass2: Program already done");    }       Pike_compiler->malloc_size_program = ALLOC_STRUCT(program);    Pike_compiler->fake_object=alloc_object();      #ifdef PIKE_DEBUG    Pike_compiler->fake_object->storage=(char *)malloc(256 * sizeof(struct svalue));    if (Pike_compiler->fake_object->storage) {    /* Stipple to find illegal accesses */ -  MEMSET(Pike_compiler->fake_object->storage,0x55,256*sizeof(struct svalue)); +  memset(Pike_compiler->fake_object->storage,0x55,256*sizeof(struct svalue));    PIKE_MEM_WO_RANGE (Pike_compiler->fake_object->storage,    256 * sizeof (struct svalue));    }   #else    Pike_compiler->fake_object->storage=(char *)malloc(sizeof(struct parent_info));   #endif    if (!Pike_compiler->fake_object->storage) {    yyerror("Out of memory when allocating object storage.");    }    /* Can't use GC_ALLOC on fake objects, but still it's good to know
pike.git/src/program.c:9308:   }      static void compilation_event_handler(int e)   {    struct compilation *c = THIS_COMPILATION;       switch (e) {    case PROG_EVENT_INIT:    CDFPRINTF((stderr, "th(%ld) compilation: INIT(%p).\n",    (long) th_self(), c)); -  MEMSET(c, 0, sizeof(*c)); +  memset(c, 0, sizeof(*c));    c->supporter.self = Pike_fp->current_object; /* NOTE: Not ref-counted! */    c->compilation_inherit =    Pike_fp->context - Pike_fp->current_object->prog->inherits;    initialize_buf(&c->used_modules);    SET_SVAL(c->default_module, T_MAPPING, 0, mapping, get_builtin_constants());    add_ref(c->default_module.u.mapping);    c->major = -1;    c->minor = -1;    c->lex.current_line = 1;    c->lex.current_file = make_shared_string("-");