diff options
| -rw-r--r-- | runtime/gc/heap.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index ef4fa28f23..df097a0e60 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -4004,7 +4004,8 @@ void Heap::RegisterNativeAllocation(JNIEnv* env, size_t bytes) { native_blocking_gcs_finished_++; native_blocking_gc_cond_->Broadcast(self); } - } else if (new_value > NativeAllocationGcWatermark() && !IsGCRequestPending()) { + } else if (new_value > NativeAllocationGcWatermark() * HeapGrowthMultiplier() && + !IsGCRequestPending()) { // Trigger another GC because there have been enough native bytes // allocated since the last GC. if (IsGcConcurrent()) { |