From 6b5f6d6c0eb8014868ad7c88c8a6906a3d984f7c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 31 Jan 2022 16:16:59 +0100 Subject: 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. --- Userland/Libraries/LibJS/Heap/Heap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries') 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 + * Copyright (c) 2020-2022, Andreas Kling * * 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(32)); m_allocators.append(make(64)); + m_allocators.append(make(96)); m_allocators.append(make(128)); m_allocators.append(make(256)); m_allocators.append(make(512)); -- cgit v1.2.3