pike.git / src / block_allocator.c

version» Context lines:

pike.git/src/block_allocator.c:104:       if ((page_size & (page_size - 1)) == 0)    a->magnitude = (uint16_t)ctz32(page_size);    else    a->magnitude = (uint16_t)ctz32(round_up32(page_size));    //fprintf(stderr, "page_size: %u, magnitude: %u\n", page_size, a->magnitude);       a->block_size = block_size;    a->blocks = blocks;    a->num_pages = 0; -  a->empty_blocks = 0; -  a->max_empty_blocks = 3; +  a->empty_pages = 0; +  a->max_empty_pages = 3;       // we start with management structures for 16 pages    a->allocated = 16;    a->pages = NULL;   #ifndef BA_SEGREGATE    a->ba_page_size = BA_SPAGE_SIZE(a);   #endif    ba_realloc(a);   }