Commit ceebb4c5 by olly Committed by Oliver Woodman

Fix incorrect index in DefaultAllocator.trim

This could cause us to "lose" allocations backed by an
initial block, meaning they became unavailable for use
despite still being allocated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931465
parent 894376fb
......@@ -134,7 +134,7 @@ public final class DefaultAllocator implements Allocator {
if (lowAllocation.data == initialAllocationBlock) {
lowIndex++;
} else {
Allocation highAllocation = availableAllocations[lowIndex];
Allocation highAllocation = availableAllocations[highIndex];
if (highAllocation.data != initialAllocationBlock) {
highIndex--;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment