Branch: Tag:

2013-06-12

2013-06-12 20:04:24 by Arne Goedeke <el@laramies.com>

Added new block allocator. It dramatically speeds up free, when
allocating many blocks and deallocation happens non linearly.

9:      #include "svalue.h"   #include "dmalloc.h" - #include "block_alloc_h.h" +       /* Compatible with PIKE_WEAK_INDICES and PIKE_WEAK_VALUES. */   #define MAPPING_WEAK_INDICES 2
133:   }while(0)      /* Prototypes begin here */ - BLOCK_ALLOC_FILL_PAGES(mapping, 2); + void really_free_mapping(struct mapping * m); + void count_memory_in_mappings(size_t * num, size_t * size);                -  +    void mapping_free_keypair(struct mapping_data *md, struct keypair *k);      PMOD_EXPORT struct mapping *debug_allocate_mapping(int size);
387:   void debug_dump_mapping(struct mapping *m);   int mapping_is_constant(struct mapping *m,    struct processing *p); + void free_all_mapping_blocks(); +    /* Prototypes end here */      #define allocate_mapping(X) dmalloc_touch(struct mapping *,debug_allocate_mapping(X))