Changeset 738 for trunk/server/items.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/items.c

    r737 r738  
    8989        return 0; 
    9090 
    91     it = slabs_alloc(ntotal); 
     91    it = slabs_alloc(ntotal, id); 
    9292    if (it == 0) { 
    9393        int tries = 50; 
     
    120120            } 
    121121        } 
    122         it = slabs_alloc(ntotal); 
     122        it = slabs_alloc(ntotal, id); 
    123123        if (it == 0) return NULL; 
    124124    }