mem: fix bug with slab_create
before this would overwrite into the next region, which would cause an error at `buddy_alloc_helper` as the region overridden was the `len` field of a `struct buddy_free_list`
This commit is contained in:
parent
4db95954a3
commit
addf96aae7
3 changed files with 17 additions and 15 deletions
|
|
@ -108,7 +108,7 @@ static paddr_t buddy_alloc_helper(struct buddy_region_header *head, size_t size)
|
|||
struct buddy_free_list *new = (struct buddy_free_list *)((uintptr_t)flist + flist->len / 2);
|
||||
new->next = flist->next;
|
||||
new->prev = flist;
|
||||
new->len = flist->len >> 1;
|
||||
new->len = MAX(flist->len >> 1, 0x1000ull);
|
||||
new->depth = flist->depth + 1;
|
||||
|
||||
if (new->next != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue