Explorar o código

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.
Andreas Kling %!s(int64=3) %!d(string=hai) anos
pai
achega
17f239e1c0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Userland/Libraries/LibJS/Heap/BlockAllocator.h

+ 1 - 1
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<void*, max_cached_blocks> m_blocks;
 };