mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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) {
|
if (lowAllocation.data == initialAllocationBlock) {
|
||||||
lowIndex++;
|
lowIndex++;
|
||||||
} else {
|
} else {
|
||||||
Allocation highAllocation = availableAllocations[lowIndex];
|
Allocation highAllocation = availableAllocations[highIndex];
|
||||||
if (highAllocation.data != initialAllocationBlock) {
|
if (highAllocation.data != initialAllocationBlock) {
|
||||||
highIndex--;
|
highIndex--;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue