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
This commit is contained in:
olly 2016-09-01 04:01:57 -07:00 committed by Oliver Woodman
parent 894376fbe6
commit ceebb4c561

View File

@ -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 {