Bug fix for using failing to initialise meta-data
If the Superslab meta-data is larger than an OS page, then the subsequent pages could be decommited. This removes the skipped initialisation in that case.
This commit is contained in:
committed by
Matthew Parkinson
parent
8990c34911
commit
01b282a5f3
@@ -81,7 +81,10 @@ namespace snmalloc
|
||||
{
|
||||
allocator = alloc;
|
||||
|
||||
if (kind != Super)
|
||||
// If Superslab is larger than a page, then we cannot guarantee it still
|
||||
// has a valid layout as the subsequent pages could have been freed and
|
||||
// zeroed, hence only skip initialisation if smaller.
|
||||
if (kind != Super || (sizeof(Superslab) >= OS_PAGE_SIZE))
|
||||
{
|
||||
if (kind != Fresh)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user