diff --git a/BeefLibs/corlib/src/BumpAllocator.bf b/BeefLibs/corlib/src/BumpAllocator.bf index 3b31db60..b7a60eb2 100644 --- a/BeefLibs/corlib/src/BumpAllocator.bf +++ b/BeefLibs/corlib/src/BumpAllocator.bf @@ -29,6 +29,9 @@ namespace System uint8* mCurPtr; uint8* mCurEnd; + public int PoolSizeMin = 4*1024; + public int PoolSizeMax = 64*1024; + #if BF_ENABLE_REALTIME_LEAK_CHECK // We will either contain only data that needs to be marked or not, based on the first // data allocated. The paired allocator will contain the other type of data @@ -94,7 +97,7 @@ namespace System protected virtual Span AllocPool() { int poolSize = (mPools != null) ? mPools.Count : 0; - int allocSize = Math.Clamp((int)Math.Pow(poolSize, 1.5) * 4*1024, 4*1024, 64*1024); + int allocSize = Math.Clamp((int)Math.Pow(poolSize, 1.5) * PoolSizeMin, PoolSizeMin, PoolSizeMax); return Span(new uint8[allocSize]* (?), allocSize); }