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:
Michael Shaw 2023-05-19 20:13:31 -04:00
commit ceb0287109

View file

@ -49,6 +49,7 @@ slab_t *slab_create(size_t size, size_t cache_size, uint64_t flags)
ret->align = SLAB_ALIGN;
}
start -= 1;
start |= ret->align;
start += 1;