diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-14 00:49:47 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-14 00:49:47 +0200 |
commit | 6b146e80e1841b0a8c9788b2bbb9b7c16a158f6d (patch) | |
tree | fd849d0df659b05fecc41ae2889236ab3af5e417 /kern/zalloc.c | |
parent | 55c57827e99f067cb8f715b1be78d4822005388c (diff) |
More restrictive requirements on zone alignment
kern/zalloc.c (zinit): Panic if requested alignment doesn't match page
size and list elements.
Diffstat (limited to 'kern/zalloc.c')
-rw-r--r-- | kern/zalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/zalloc.c b/kern/zalloc.c index 839e40f..9b3ac4b 100644 --- a/kern/zalloc.c +++ b/kern/zalloc.c @@ -214,7 +214,7 @@ zone_t zinit(size, align, max, alloc, memtype, name) max = alloc; if (align > 0) { - if (align >= PAGE_SIZE) + if (PAGE_SIZE % align || align % sizeof(z->free_elements)) panic("zinit"); ALIGN_SIZE_UP(size, align); } |