public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] record last user if malloc request is exact 4k
@ 2006-01-30 17:49 Olaf Hering
  2006-01-30 20:23 ` Pekka Enberg
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2006-01-30 17:49 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-30 20:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-30 17:49 [PATCH] record last user if malloc request is exact 4k Olaf Hering
2006-01-30 20:23 ` Pekka Enberg
2006-01-30 20:25   ` Olaf Hering
2006-01-30 20:35     ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox