1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

LibJS: Align HeapBlock cell storage to __BIGGEST_ALIGNMENT__

alignas(Cell) is just the alignment requirement for the base class
(which resolves to 8-bytes). This does not necessarily hold for all
subclasses.
This commit is contained in:
MacDue 2023-06-15 23:02:15 +01:00 committed by Jelle Raaijmakers
parent d4d92184b3
commit 130ec7e5b4

View file

@ -111,7 +111,7 @@ private:
size_t m_cell_size { 0 };
size_t m_next_lazy_freelist_index { 0 };
GCPtr<FreelistEntry> m_freelist;
alignas(Cell) u8 m_storage[];
alignas(__BIGGEST_ALIGNMENT__) u8 m_storage[];
public:
static constexpr size_t min_possible_cell_size = sizeof(FreelistEntry);