slab: fix alignment
If the pointer the the beginning of the slab was the beginning of the aligned region, instead of jumping to the next, as was done previously, we use the already aligned pointer instead.
This commit is contained in:
parent
29a0435cf6
commit
ceb0287109
1 changed files with 1 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ slab_t *slab_create(size_t size, size_t cache_size, uint64_t flags)
|
||||||
ret->align = SLAB_ALIGN;
|
ret->align = SLAB_ALIGN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start -= 1;
|
||||||
start |= ret->align;
|
start |= ret->align;
|
||||||
start += 1;
|
start += 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue