summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-01-31 16:16:59 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-31 16:19:23 +0100
commit6b5f6d6c0eb8014868ad7c88c8a6906a3d984f7c (patch)
tree6b27ccfa181c7927a6b8b8a7619366948d35e723 /Userland/Libraries
parent8bdf6441b182674c0803750313888daf17f0220c (diff)
downloadserenity-6b5f6d6c0eb8014868ad7c88c8a6906a3d984f7c.zip
LibJS: Add a 96-byte CellAllocator
Two of our most frequently allocated objects are Shape (88 bytes) and DeclarativeEnvironment (80 bytes). Putting these into 128-byte cells was quite wasteful, so let's add a more suitable allocator for them.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Heap/Heap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp
index 3e075cb2e4..cf792ba04a 100644
--- a/Userland/Libraries/LibJS/Heap/Heap.cpp
+++ b/Userland/Libraries/LibJS/Heap/Heap.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -43,6 +43,7 @@ Heap::Heap(VM& vm)
static_assert(HeapBlock::min_possible_cell_size <= 24, "Heap Cell tracking uses too much data!");
m_allocators.append(make<CellAllocator>(32));
m_allocators.append(make<CellAllocator>(64));
+ m_allocators.append(make<CellAllocator>(96));
m_allocators.append(make<CellAllocator>(128));
m_allocators.append(make<CellAllocator>(256));
m_allocators.append(make<CellAllocator>(512));