Index: linux-2.6.21-rc6/mm/slub.c =================================================================== --- linux-2.6.21-rc6.orig/mm/slub.c 2007-04-11 13:34:19.000000000 -0700 +++ linux-2.6.21-rc6/mm/slub.c 2007-04-11 13:34:41.000000000 -0700 @@ -2024,7 +2024,7 @@ size_t ksize(const void *object) * Debugging requires use of the padding between object * and whatever may come after it. */ - if (s->flags & (SLAB_RED_ZONE | SLAB_POISON)) +// if (s->flags & (SLAB_RED_ZONE | SLAB_POISON)) return s->objsize; /* @@ -2032,13 +2032,13 @@ size_t ksize(const void *object) * back there or track user information then we can * only use the space before that information. */ - if (s->flags & (SLAB_DESTROY_BY_RCU | SLAB_STORE_USER)) - return s->inuse; +// if (s->flags & (SLAB_DESTROY_BY_RCU | SLAB_STORE_USER)) +// return s->inuse; /* * Else we can use all the padding etc for the allocation */ - return s->size; +// return s->size; } EXPORT_SYMBOL(ksize);