From 17f239e1c07bf2a2f217eb56120d0c42751067ef Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 7 Oct 2021 23:20:47 +0200 Subject: [PATCH] LibJS: Increase GC heap BlockAllocator cache size Let's accept keeping up to 8 MiB of HeapBlock memory cached. This allows the GC allocator to reuse memory instead of asking the kernel for more. --- Userland/Libraries/LibJS/Heap/BlockAllocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Heap/BlockAllocator.h b/Userland/Libraries/LibJS/Heap/BlockAllocator.h index 70c873c10f..b70cf08d8d 100644 --- a/Userland/Libraries/LibJS/Heap/BlockAllocator.h +++ b/Userland/Libraries/LibJS/Heap/BlockAllocator.h @@ -20,7 +20,7 @@ public: void deallocate_block(void*); private: - static constexpr size_t max_cached_blocks = 64; + static constexpr size_t max_cached_blocks = 512; Vector m_blocks; };