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

    r653 r738  
    572572/******************************* SLAB ALLOCATOR ******************************/ 
    573573 
    574 void *mt_slabs_alloc(size_t size) { 
     574void *mt_slabs_alloc(size_t size, unsigned int id) { 
    575575    void *ret; 
    576576 
    577577    pthread_mutex_lock(&slabs_lock); 
    578     ret = do_slabs_alloc(size); 
     578    ret = do_slabs_alloc(size, id); 
    579579    pthread_mutex_unlock(&slabs_lock); 
    580580    return ret;