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.

41:   #define CAR_TO_INT(TYPE) ((char *) (TYPE)->car - (char *) 0)   #define CDR_TO_INT(TYPE) ((char *) (TYPE)->cdr - (char *) 0)    - #include "block_alloc_h.h" - BLOCK_ALLOC(pike_type, n/a); -  +    /*    * pike_type flags:    */
210:   } while(0)      /* Prototypes begin here */ + PMOD_EXPORT void really_free_pike_type(struct pike_type * t); + PMOD_EXPORT ATTRIBUTE((malloc)) struct pike_type * alloc_pike_type(); + PMOD_EXPORT void count_memory_in_pike_types(size_t *n, size_t *s);   void debug_check_type_string(struct pike_type *s);   void init_types(void);   ptrdiff_t pop_stack_mark(void);