All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: hch@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] kmem_cache_zalloc
Date: Thu, 28 Mar 2002 16:51:42 +0530	[thread overview]
Message-ID: <20020328165142.A23089@in.ibm.com> (raw)


In article <20020327201917.A23810@phoenix.infradead.org> Christoph Hellwig wrote:

> I'd really go for k(mem_)zalloc, but a kmem_cache_alloc leads people toward
> writing bad code.  The purpose of the slab allocator is to allow caching
> readily constructed objects, a _zalloc destroys them on alloc.

I thought that the life span of an object is between 
kmem_cache_alloc and kmem_cache_free. If you are expecting caching 
beyond this, you may not get correct data. kmem_cache allocator
is supposed to quickly allocate fixed size structures avoiding
the need for frequent splitting and coalescing in the allocator.

Am I missing something here ?

Thanks
-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

             reply	other threads:[~2002-03-28 11:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-28 11:21 Dipankar Sarma [this message]
2002-03-28 11:25 ` [RFC] kmem_cache_zalloc David Woodhouse
2002-03-28 11:40   ` Dipankar Sarma
  -- strict thread matches above, loose matches on Subject: below --
2002-03-27 19:39 Eric Sandeen
2002-03-27 19:47 ` Andrew Morton
2002-03-27 19:52 ` Tigran Aivazian
2002-03-27 20:17   ` Alan Cox
2002-03-29 22:17     ` Pavel Machek
2002-03-29 23:21       ` Alan Cox
2002-03-27 20:19 ` Christoph Hellwig
2002-03-27 20:23   ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020328165142.A23089@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.