Move link out of object space.

The link object was previously stored in a disused object.  This is
good for reducing meta-data, but if we want to reduce the meta-data
corruption potential, then this is not a good design choice.

This commit moves it into the Metaslab.
This commit is contained in:
Matthew Parkinson
2021-03-12 21:11:43 +00:00
committed by Matthew Parkinson
parent e7dce55f19
commit 59edf294d0
5 changed files with 75 additions and 107 deletions

View File

@@ -110,6 +110,17 @@ namespace snmalloc
#endif
}
/**
* Nulls the previous pointer
*
* The Meta-slab uses nullptr in prev to mean that it is not part of a
* size class list.
**/
void null_prev()
{
prev = nullptr;
}
SNMALLOC_FAST_PATH CDLLNode* get_prev()
{
return prev;