mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
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.
This commit is contained in:
parent
8bdf6441b1
commit
6b5f6d6c0e
1 changed files with 2 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue