From 84a8ee01e198475b700fa7ad203213fac98cfbb1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 19 Nov 2023 09:43:52 +0100 Subject: [PATCH] LibJS: Lower HeapBlock size to 4 KiB This is to prepare for making per-type allocators, since we'll have a *lot* more HeapBlocks in that world. --- Userland/Libraries/LibJS/Heap/Internals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Heap/Internals.h b/Userland/Libraries/LibJS/Heap/Internals.h index 2242dee77e..08d20537d0 100644 --- a/Userland/Libraries/LibJS/Heap/Internals.h +++ b/Userland/Libraries/LibJS/Heap/Internals.h @@ -33,7 +33,7 @@ class HeapBlockBase { AK_MAKE_NONCOPYABLE(HeapBlockBase); public: - static constexpr auto block_size = 16 * KiB; + static constexpr auto block_size = 4 * KiB; static HeapBlockBase* from_cell(Cell const* cell) { return reinterpret_cast(bit_cast(cell) & ~(HeapBlockBase::block_size - 1));