Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56398
b: refs/heads/master
c: cfbf07f
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 15, 2007
1 parent 0eb1996 commit 25c147e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 6a3ee3d5529c5e66aedf91401bfac65c61998639
refs/heads/master: cfbf07f2a80b618c42a42c20d83647ea8fcceca0
6 changes: 5 additions & 1 deletion trunk/include/linux/slub_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ struct kmem_cache {
#define KMALLOC_SHIFT_LOW 3

#ifdef CONFIG_LARGE_ALLOCS
#define KMALLOC_SHIFT_HIGH 25
#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \
(MAX_ORDER + PAGE_SHIFT - 1) : 25)
#else
#if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256
#define KMALLOC_SHIFT_HIGH 20
Expand All @@ -87,6 +88,9 @@ static inline int kmalloc_index(int size)
*/
WARN_ON_ONCE(size == 0);

if (size >= (1 << KMALLOC_SHIFT_HIGH))
return -1;

if (size > 64 && size <= 96)
return 1;
if (size > 128 && size <= 192)
Expand Down

0 comments on commit 25c147e

Please sign in to comment.