Changeset 738 for trunk/server/slabs.c

Show
Ignore:
Timestamp:
03/03/08 05:08:26 (21 months ago)
Author:
dormando
Message:

Don't re-calculate the slab class id.
slabs_alloc() internally calls slabs_clsid(), so an eviction case would crawl the list of slab classes three times.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/server/slabs.c

    r724 r738  
    219219 
    220220/*@null@*/ 
    221 void *do_slabs_alloc(const size_t size) { 
     221void *do_slabs_alloc(const size_t size, unsigned int id) { 
    222222    slabclass_t *p; 
    223223 
    224     unsigned int id = slabs_clsid(size); 
    225224    if (id < POWER_SMALLEST || id > power_largest) 
    226225        return NULL;