Skip to content

Commit

Permalink
Fix on stack allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Jun 25, 2024
1 parent 5a31854 commit c1de645
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thread/stack-allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1de645

Please sign in to comment.