Hi... On Fri, Nov 5, 2010 at 10:03, kernel.niko <kernel.niko@xxxxxxxxx> wrote: > hi,everyone, > I'm wandering how to use kmalloc and kmem_cache_alloc. > as i know,kmalloc is based on kmem_cache_alloc ,so what's the different? > when to use kmalloc? and > in what occasion,kmem_cache_alloc should be used? Usually, if a function is wrapped by another, it is to optimize something. In this case, I think, without looking at the code, kmalloc is anticipating the case where we might reuse the existing cache. OR, it might try to use the warm ones to optimize cache usage. You might try to confirm my above suspicions... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ