1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:58:11 +00:00
serenity/Libraries/LibJS/Heap
Andreas Kling 48f13b7c3f LibJS: Split Heap into per-cell-size allocators
Instead of keeping all the HeapBlocks in one big list, we now split it
into two levels:

- Heap has a set of Allocators, each with a specific cell size.
- Allocators have two lists of blocks, "full" and "usable".

Allocating a new cell no longer has to scan the entire set of blocks,
but instead just needs to find the right allocator and then pop a cell
from its freelist. If all the blocks in the allocator are full, a new
block will be created.

Blocks are moved from the "full" to "usable" list after sweeping has
determined that they are not completely empty and not completely full.

There are certainly many ways we can improve on this. This patch is
mostly about getting the new allocator architecture in place. :^)
2020-10-06 18:50:47 +02:00
..
Allocator.cpp LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
Allocator.h LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
DeferGC.h LibJS: Add DeferGC, a RAII way to prevent GC temporarily 2020-04-19 12:09:32 +02:00
Handle.cpp LibJS: Add missing copyright headers 2020-03-18 20:21:06 +01:00
Handle.h Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Heap.cpp LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
Heap.h LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00
HeapBlock.cpp LibJS: Always inline HeapBlock::allocate() 2020-10-04 19:25:49 +02:00
HeapBlock.h LibJS: Split Heap into per-cell-size allocators 2020-10-06 18:50:47 +02:00