Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pool shrinking with new allocations #160

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

chrisvest
Copy link
Owner

Make BAllocThread.reduceSizeByDeallocating() call refill on the disregardPile and the newAllocations. Otherwise, the pool might not be able to deallocate objects allocated but unused prior to a new target size being set. This is normally not a big deal for pools that have any sort of activity, but the ThreadedPoolTest.decreasingSizeMustNotDeallocateTlrClaimedObjects test could end up in an infinite loop, and break the build.

Make BAllocThread.reduceSizeByDeallocating() call refill on the disregardPile and the newAllocations.
Otherwise, the pool might not be able to deallocate objects allocated but unused prior to a new target size being set.
This is normally not a big deal for pools that have any sort of activity, but the `ThreadedPoolTest.decreasingSizeMustNotDeallocateTlrClaimedObjects` test could end up in an infinite loop, and break the build.
@chrisvest chrisvest merged commit f478ee5 into main May 27, 2024
2 checks passed
@chrisvest chrisvest deleted the fix-pool-shrink-new-alloc branch May 27, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant