pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:620:    if(old_base)    free(old_base);   }      /* Allocation of strings */      #define STRING_BLOCK 2048         static struct block_allocator string_allocator = -  BA_INIT(sizeof(struct pike_string), STRING_BLOCK); +  BA_INIT_PAGES(sizeof(struct pike_string), 2);   static struct block_allocator substring_allocator = -  BA_INIT(sizeof(struct substring_pike_string), STRING_BLOCK>>2); +  BA_INIT_PAGES(sizeof(struct substring_pike_string), 1);      static void free_string_content(struct pike_string * s)   {    switch (s->alloc_type)    {    case STRING_ALLOC_STATIC:    break;    case STRING_ALLOC_MALLOC:    free(s->str);    break;