[lkml]   [2002]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] (repost) kmem_cache_zalloc
Hi Christoph - 

On Thu, 2002-04-25 at 03:41, Christoph Hellwig wrote:

> I don't think kmem_cache_zalloc is a good idea. The idea behind the slab
> cache is to allow object reuse by storing constructed objects in the
> caches, and a memset directly after the alloc destroys the object state.
> A kmen_zalloc/kzalloc might make more sense.

The constructor is one part of it, but what about more efficient memory
use? If we let things fall into the default power-of-two caches, we'd
waste quite a lot of memory.

See for example.

On this machine we'd use 30% more memory by using kmem_alloc vs


Eric Sandeen XFS for Linux SGI, Inc.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.057 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site