pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:2102:    PIKE_MEM_RW_RANGE(&res->next, sizeof(void*));    free_pike_frame = res->next;    PIKE_MEM_WO_RANGE(&res->next, sizeof(void*));    res->refs=0;    add_ref(res); /* For DMALLOC... */    res->flags=0;    res->next=0;    res->scope=0;    res->pc = NULL;    +  res->save_locals_bitmask = NULL;    return res;    }       /* Need to allocate more. */    {    unsigned int i;   #define FRAMES_PER_CHUNK ((4096*4-8-sizeof(struct pike_frame_chunk))/sizeof(struct pike_frame))   #define FRAME_CHUNK_SIZE (FRAMES_PER_CHUNK*sizeof(struct pike_frame))+sizeof(struct pike_frame_chunk)       void *p = xalloc( FRAME_CHUNK_SIZE );
pike.git/src/interpret.c:4085:    Pike_mark_sp=frame->save_mark_sp;       if (LIKELY(frame->refs == 1)) {    /* reset some entries which are changed during    * execution of Pike code. We can probably    * make most of these PIKE_DEBUG stuff */    frame->pc = c->ptr;    frame->num_locals = 0;    frame->num_args = 0;    frame->return_addr = NULL; -  if (UNLIKELY(frame->flags & PIKE_FRAME_SAVE_LOCALS)) +  if (UNLIKELY(frame->save_locals_bitmask)) {    free(frame->save_locals_bitmask); -  +  frame->save_locals_bitmask = NULL; +  }    frame->flags = 0;    return;    }       struct pike_frame *n = alloc_pike_frame();       *n = *frame;    n->refs = 1;    n->flags = 0;    n->pc = c->ptr;
pike.git/src/interpret.c:4293:    }    if (bitmask & (1 << (idx % 16)) || idx < exp_offset) {    assign_svalue_no_free(s + (ptrdiff_t)idx,    locals + (ptrdiff_t)idx);    }    }    }    if (frame->flags & PIKE_FRAME_SAVE_LOCALS) {    frame->flags &= ~PIKE_FRAME_SAVE_LOCALS;    free(frame->save_locals_bitmask); +  frame->save_locals_bitmask = NULL;    }    frame->num_locals = num_new_locals;    frame->locals=s;    frame->flags|=PIKE_FRAME_MALLOCED_LOCALS;    } else {    frame->locals=0;    }    frame->next=0;    }    Pike_fp=tmp_;