diff --git a/src/core/pool_func.hpp b/src/core/pool_func.hpp index a2cbb3af73..91b2095740 100644 --- a/src/core/pool_func.hpp +++ b/src/core/pool_func.hpp @@ -55,7 +55,7 @@ DEFINE_POOL_METHOD(inline void)::ResizeFor(size_t index) dbg_assert(index >= this->size); dbg_assert(index < Tmax_size); - size_t new_size = std::min(Tmax_size, Align(index + 1, std::max(64, Tgrowth_step))); + size_t new_size = std::min(Tmax_size, Align(std::max(index + 1, (this->size * 3) / 2), std::max(64, Tgrowth_step))); this->data = ReallocT(this->data, new_size); MemSetT(this->data + this->size, 0, new_size - this->size);