Made a sizecass_t to wrap the sizeclass
This is useful as codegen is nicer if we use size_t, but the semantics is uint8_t, and is stored as that in many places in the metadata. Ultimately should introduce a wrapper to check this invariant.
This commit is contained in:
@@ -137,7 +137,7 @@ extern "C"
|
||||
}
|
||||
|
||||
size = bits::max(size, alignment);
|
||||
uint8_t sc = size_to_sizeclass(size);
|
||||
snmalloc::sizeclass_t sc = size_to_sizeclass(size);
|
||||
if (sc >= NUM_SIZECLASSES)
|
||||
{
|
||||
// large allocs are 16M aligned.
|
||||
|
||||
Reference in New Issue
Block a user