Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86683
b: refs/heads/master
c: d8b42bf
h: refs/heads/master
i:
  86681: 1575e85
  86679: 671d16f
v: v3
  • Loading branch information
Christoph Lameter committed Mar 3, 2008
1 parent 4df7bc1 commit 3803c98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae20bfda6813387af18c7fdbc0f8b1fa7be2d05b
refs/heads/master: d8b42bf54be18b5d0bad941b3a1d3e8f022651a7
15 changes: 8 additions & 7 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,14 @@ static int calculate_sizes(struct kmem_cache *s)
unsigned long size = s->objsize;
unsigned long align = s->align;

/*
* Round up object size to the next word boundary. We can only
* place the free pointer at word boundaries and this determines
* the possible location of the free pointer.
*/
size = ALIGN(size, sizeof(void *));

#ifdef CONFIG_SLUB_DEBUG
/*
* Determine if we can poison the object itself. If the user of
* the slab may touch the object after free or before allocation
Expand All @@ -2140,14 +2148,7 @@ static int calculate_sizes(struct kmem_cache *s)
else
s->flags &= ~__OBJECT_POISON;

/*
* Round up object size to the next word boundary. We can only
* place the free pointer at word boundaries and this determines
* the possible location of the free pointer.
*/
size = ALIGN(size, sizeof(void *));

#ifdef CONFIG_SLUB_DEBUG
/*
* If we are Redzoning then check if there is some space between the
* end of the object and the free pointer. If not then add an
Expand Down

0 comments on commit 3803c98

Please sign in to comment.