pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1918:    X->context=0; \    X->scope=0; \    X->current_object=0; \    X->flags=0; \    X->expendible=0; \    X->locals=0; \    DO_IF_SECURITY( X->current_creds=0; ) \    ) \   }while(0)    + #ifndef PIKE_NEW_BLOCK_ALLOC   BLOCK_ALLOC_FILL_PAGES(pike_frame, 4) -  + #else + #include "gjalloc.h" + struct block_allocator pike_frame_allocator = BA_INIT(sizeof(struct pike_frame), +  4*4096/sizeof(struct pike_frame)); + INLINE struct pike_frame * alloc_pike_frame() { +  struct pike_frame * f = (struct pike_frame *)ba_alloc(&pike_frame_allocator); +  INIT_BLOCK(f); +  return f; + }    -  + INLINE void really_free_pike_frame(struct pike_frame * f) { +  EXIT_BLOCK(f); +  ba_free(&pike_frame_allocator, f); + }    -  + void count_memory_in_pike_frames(size_t * num, size_t * size) { +  ba_count_all(&pike_frame_allocator, num, size); + } + #endif +  +    void really_free_pike_scope(struct pike_frame *scope)   {    if(scope->flags & PIKE_FRAME_MALLOCED_LOCALS)    {    free_mixed_svalues(scope->locals,scope->num_locals);    free((char *)(scope->locals));   #ifdef PIKE_DEBUG    scope->flags&=~PIKE_FRAME_MALLOCED_LOCALS;   #endif    }