pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:429:    (struct gc_rec_frame *) (ptrdiff_t) -1; \    }); \    rec_frames--; \    } while (0)      BLOCK_ALLOC_FILL_PAGES (gc_rec_frame, 2)   #else   #include "gjalloc.h"      struct block_allocator gc_rec_frame_allocator = -  BA_INIT(sizeof(struct gc_rec_frame), 4096/sizeof(struct gc_rec_frame)); +  BA_INIT_PAGES(sizeof(struct gc_rec_frame), 2*PIKE_MALLOC_PAGE_SIZE);      static INLINE void really_free_gc_rec_frame(struct gc_rec_frame * f) {   #ifdef PIKE_DEBUG    if (f->rf_flags & GC_FRAME_FREED)    gc_fatal (f->data, 0, "Freeing gc_rec_frame twice.\n");    f->rf_flags |= GC_FRAME_FREED;    f->u.link_top = (struct link_frame *) (ptrdiff_t) -1;    f->prev = f->next = f->cycle_id = f->cycle_piece =    (struct gc_rec_frame *) (ptrdiff_t) -1;   #endif
pike.git/src/gc.c:472:   #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT u.next   #undef INIT_BLOCK   #define INIT_BLOCK(f)   #undef EXIT_BLOCK   #define EXIT_BLOCK(f)      BLOCK_ALLOC_FILL_PAGES (ba_mixed_frame, 2)   #else   static struct block_allocator ba_mixed_frame_allocator -  = BA_INIT(sizeof(struct ba_mixed_frame), 4096/sizeof(struct ba_mixed_frame)); +  = BA_INIT_PAGES(sizeof(struct ba_mixed_frame), 2*PIKE_MALLOC_PAGE_SIZE);      void count_memory_in_ba_mixed_frames(size_t *num, size_t * size) {    ba_count_all(&ba_mixed_frame_allocator, num, size);   }   #endif      static INLINE struct link_frame *alloc_link_frame()   {   #ifndef PIKE_NEW_BLOCK_ALLOC    struct ba_mixed_frame *f = alloc_ba_mixed_frame();