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:
parent
894376fbe6
commit
ceebb4c561
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user