Skip to content

Commit

Permalink
SLUB: after object padding only needed for Redzoning
Browse files Browse the repository at this point in the history
If no redzoning is selected then we do not need padding before the next
object.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 9, 2007
1 parent 65c02d4 commit be7b3fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ static int calculate_sizes(struct kmem_cache *s)
*/
size += 2 * sizeof(struct track);

if (flags & DEBUG_DEFAULT_FLAGS)
if (flags & SLAB_RED_ZONE)
/*
* Add some empty padding so that we can catch
* overwrites from earlier objects rather than let
Expand Down

0 comments on commit be7b3fb

Please sign in to comment.