mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
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.
This commit is contained in:
parent
eca9874e56
commit
84a8ee01e1
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ class HeapBlockBase {
|
||||||
AK_MAKE_NONCOPYABLE(HeapBlockBase);
|
AK_MAKE_NONCOPYABLE(HeapBlockBase);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr auto block_size = 16 * KiB;
|
static constexpr auto block_size = 4 * KiB;
|
||||||
static HeapBlockBase* from_cell(Cell const* cell)
|
static HeapBlockBase* from_cell(Cell const* cell)
|
||||||
{
|
{
|
||||||
return reinterpret_cast<HeapBlockBase*>(bit_cast<FlatPtr>(cell) & ~(HeapBlockBase::block_size - 1));
|
return reinterpret_cast<HeapBlockBase*>(bit_cast<FlatPtr>(cell) & ~(HeapBlockBase::block_size - 1));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue