mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-19 22:25:36 +00:00
LibJS: Allocate 4 KiB for Bytecode::BasicBlock
There's no reason not to, since we're using mmap() for these anyway and that gives us memory in 4 KiB increments. :^)
This commit is contained in:
@@ -22,7 +22,7 @@ BasicBlock::BasicBlock(String name)
|
||||
// FIXME: This is not the smartest solution ever. Find something cleverer!
|
||||
// The main issue we're working around here is that we don't want pointers into the bytecode stream to become invalidated
|
||||
// during code generation due to dynamic buffer resizing. Otherwise we could just use a Vector.
|
||||
m_buffer_capacity = 1 * KiB;
|
||||
m_buffer_capacity = 4 * KiB;
|
||||
m_buffer = (u8*)mmap(nullptr, m_buffer_capacity, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
|
||||
VERIFY(m_buffer != MAP_FAILED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user