mem: set buddy_alloc_helper minimum size to 0x1000 bytes
This commit is contained in:
parent
a1329f092b
commit
a08a7dd1a4
1 changed files with 5 additions and 0 deletions
|
|
@ -102,6 +102,11 @@ static paddr_t buddy_alloc_helper(struct buddy_region_header *head, size_t size)
|
|||
printf(LOG_WARN "buddy_alloc: size not a power of 2\n");
|
||||
}
|
||||
|
||||
if (size < 0x1000) {
|
||||
printf(LOG_WARN "buddy_alloc: size too small\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct buddy_free_list *flist = head->flist;
|
||||
|
||||
while (flist != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue