[api] Fix AdjustAmountOfExternalAllocatedMemory memory reducer
The reduer should only fire on increasing memory. R=ulan@chromium.org Change-Id: I4abd956ea14730b223724a01af819be574b1aa3a Reviewed-on: https://chromium-review.googlesource.com/c/1308354 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#57149}
This commit is contained in:
parent
81ee4aa934
commit
2995df7d30
@ -10406,7 +10406,9 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
|
||||
*external_memory = amount;
|
||||
|
||||
int64_t allocation_diff_since_last_mc =
|
||||
*external_memory_at_last_mc - *external_memory;
|
||||
*external_memory - *external_memory_at_last_mc;
|
||||
// Only check memory pressure and potentially trigger GC if the amount of
|
||||
// external memory increased.
|
||||
if (allocation_diff_since_last_mc > kMemoryReducerActivationLimit) {
|
||||
CheckMemoryPressure();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user