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:
committed by
Matthew Parkinson
parent
e7dce55f19
commit
59edf294d0
@@ -173,8 +173,7 @@ namespace snmalloc
|
||||
meta[0].allocated = static_cast<uint16_t>(
|
||||
(SLAB_SIZE - get_initial_offset(sizeclass, true)) /
|
||||
sizeclass_to_size(sizeclass));
|
||||
meta[0].link = 1;
|
||||
meta[0].needed = 1;
|
||||
meta[0].set_full();
|
||||
meta[0].sizeclass = static_cast<uint8_t>(sizeclass);
|
||||
|
||||
used++;
|
||||
@@ -198,8 +197,7 @@ namespace snmalloc
|
||||
meta[h].allocated = static_cast<uint16_t>(
|
||||
(SLAB_SIZE - get_initial_offset(sizeclass, false)) /
|
||||
sizeclass_to_size(sizeclass));
|
||||
meta[h].needed = 1;
|
||||
meta[h].link = 1;
|
||||
meta[h].set_full();
|
||||
meta[h].sizeclass = static_cast<uint8_t>(sizeclass);
|
||||
|
||||
head = h + n + 1;
|
||||
|
||||
Reference in New Issue
Block a user