pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:2011:   PMOD_EXPORT void really_free_pike_frame( struct pike_frame *X )   {    free_object(X->current_object);    if(X->current_program)    free_program(X->current_program);    if(X->scope)    free_pike_scope(X->scope);    DO_IF_DEBUG(    if(X->flags & PIKE_FRAME_MALLOCED_LOCALS)    Pike_fatal("Pike frame is not supposed to have malloced locals here!\n")); -  if(X->flags & PIKE_FRAME_SAVE_LOCALS) +  if(X->save_locals_bitmask)    free(X->save_locals_bitmask);    DO_IF_DMALLOC(    X->current_program=0;    X->context=0;    X->scope=0;    X->current_object=0;    X->flags=0;    X->expendible_offset=0;    X->locals=0;    );
pike.git/src/interpret.c:2042:    res = free_pike_frame;    PIKE_MEMPOOL_ALLOC(&free_pike_frame, res, sizeof(struct pike_frame));    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->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:4020:    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:4225:    }    }    if (bitmask & (1 << (idx % 16)) || idx < exp_offset) {    assign_svalue_no_free(s + (ptrdiff_t)idx,    locals + (ptrdiff_t)idx);    }    }    }    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_;   }