mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibJS: Actually invoke the type-isolating cell allocators
Due to a `requires` mistake, we were always using the fallback size-based cell allocators. Also, now that we start using them, make them NeverDestroyed so we don't try to deallocate them on program exit.
This commit is contained in:
parent
f953a70965
commit
6c1fcc5f7e
2 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <AK/NeverDestroyed.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/HeapBlock.h>
|
||||
|
@ -61,7 +62,7 @@ class TypeIsolatingCellAllocator {
|
|||
public:
|
||||
using CellType = T;
|
||||
|
||||
CellAllocator allocator { sizeof(T) };
|
||||
NeverDestroyed<CellAllocator> allocator { sizeof(T) };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue