Apply ModArray to Metaslab data

Prevent bugs accessing outside the Slabs meta data.
This commit is contained in:
Matthew Parkinson
2019-01-24 09:37:39 +00:00
parent 5b81caac87
commit e30c94cb2a
3 changed files with 29 additions and 7 deletions

View File

@@ -91,6 +91,15 @@ namespace snmalloc
head = (uint16_t)~0;
}
void zero()
{
head = 0;
used = 0;
link = 0;
sizeclass = 0;
next = 0;
}
SlabLink* get_link(Slab* slab)
{
return (SlabLink*)((size_t)slab + link);