diff --git a/thread/stack-allocator.cpp b/thread/stack-allocator.cpp index a80bc48f..4d572016 100644 --- a/thread/stack-allocator.cpp +++ b/thread/stack-allocator.cpp @@ -98,7 +98,8 @@ class PooledStackAllocator { auto ptr = slots[idx].get(); if (unlikely(!ptr.first)) { // slots[idx] empty - return __alloc(size); + auto aligned_size = MIN_ALLOCATION_SIZE << idx; + return __alloc(aligned_size); } // got from pool in_pool_size -= ptr.second;