Ver Fonte

LibJS: Add inline capacity to BlockAllocator's blocks Vector

There's no need to dynamically allocate a constant sized vector :^)
Idan Horowitz há 4 anos atrás
pai
commit
ffaf27e4b6
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Userland/Libraries/LibJS/Heap/BlockAllocator.h

+ 1 - 1
Userland/Libraries/LibJS/Heap/BlockAllocator.h

@@ -22,7 +22,7 @@ public:
 private:
 private:
     static constexpr size_t max_cached_blocks = 64;
     static constexpr size_t max_cached_blocks = 64;
 
 
-    Vector<void*> m_blocks;
+    Vector<void*, max_cached_blocks> m_blocks;
 };
 };
 
 
 }
 }