Skip to content

Commit

Permalink
Merge pull request #160 from chrisvest/fix-pool-shrink-new-alloc
Browse files Browse the repository at this point in the history
Fix pool shrinking with new allocations
  • Loading branch information
chrisvest committed May 27, 2024
2 parents 9056a03 + 734c18b commit f478ee5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/stormpot/BAllocThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ private void increaseSizeByAllocating() {
}

private void reduceSizeByDeallocating(BSlot<T> slot) {
if (slot == null || !didAnythingLastIteration) {
disregardPile.refill();
newAllocations.refill();
}
slot = slot == null ? live.poll() : slot;
if (slot != null) {
if (slot.isDead() || slot.live2dead()) {
Expand Down

0 comments on commit f478ee5

Please sign in to comment.