> But kmalloc() calls kmem_cache_alloc() in turn. So whether > you call kmalloc or kmem_cache_alloc it is getting allocated > from slab cache. Am I missing something here? > Regards, > Mala Yyou might avoid the loop kmalloc does to hunt for the right size.. void * kmalloc (size_t size, int flags) { cache_sizes_t *csizep = cache_sizes; for (; csizep->cs_size; csizep++) { if (size > csizep->cs_size) continue; return __kmem_cache_alloc(flags & GFP_DMA ? csizep->cs_dmacachep : csizep->cs_cachep, flags); } return NULL; } thanks, Nivedita - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html