All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] record last user if malloc request is exact 4k
Date: Mon, 30 Jan 2006 18:49:19 +0100	[thread overview]
Message-ID: <20060130174919.GA7599@suse.de> (raw)

Is there a reason why a 4096 malloc is not recorded?
untested patch below.


allow SLAB_STORE_USER also with an exact 4k request.

Signed-off-by: Olaf Hering <olh@suse.de>

 mm/slab.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.16-rc1-olh/mm/slab.c
===================================================================
--- linux-2.6.16-rc1-olh.orig/mm/slab.c
+++ linux-2.6.16-rc1-olh/mm/slab.c
@@ -1637,7 +1637,7 @@ kmem_cache_create (const char *name, siz
 	 * above the next power of two: caches with object sizes just above a
 	 * power of two have a significant amount of internal fragmentation.
 	 */
-	if ((size < 4096
+	if ((size <= 4096
 	     || fls(size - 1) == fls(size - 1 + 3 * BYTES_PER_WORD)))
 		flags |= SLAB_RED_ZONE | SLAB_STORE_USER;
 	if (!(flags & SLAB_DESTROY_BY_RCU))

-- 
short story of a lazy sysadmin:
 alias appserv=wotan

             reply	other threads:[~2006-01-30 17:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 17:49 Olaf Hering [this message]
2006-01-30 20:23 ` [PATCH] record last user if malloc request is exact 4k Pekka Enberg
2006-01-30 20:25   ` Olaf Hering
2006-01-30 20:35     ` Pekka Enberg

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=20060130174919.GA7599@suse.de \
    --to=olh@suse.de \
    --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.