mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:57:44 +00:00
LibJS: Expose minimum possible cell size of JS::Heap
Use this to avoid creating a 16 byte cell allocator on x86_64, where the size of FreelistEntry is 24 bytes. Every JS::Cell must be at least the size of the FreelistEntry or things start crashing, so the 16 byte allocator was wasted on that platform.
This commit is contained in:
parent
07c62f9f42
commit
81a5dcde84
2 changed files with 7 additions and 1 deletions
|
@ -101,6 +101,9 @@ private:
|
|||
size_t m_next_lazy_freelist_index { 0 };
|
||||
FreelistEntry* m_freelist { nullptr };
|
||||
alignas(Cell) u8 m_storage[];
|
||||
|
||||
public:
|
||||
static constexpr size_t min_possible_cell_size = sizeof(FreelistEntry);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue