mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue