Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: src/heap/heap.h

Issue 2520963004: [heap] Ensure quick progress of incremental marking near OOM. (Closed)
Patch Set: typo Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index f29ba6b9687690e6a611658190299c1352ae614d..d8140166de893781d70fbb7c1ee09dca61c49b1c 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1852,6 +1852,10 @@ class Heap {
return (OldGenerationCapacity() + size) < MaxOldGenerationSize();
}
+ bool IsCloseToOutOfMemory(size_t slack) {
+ return OldGenerationCapacity() + slack >= MaxOldGenerationSize();
+ }
+
bool ShouldExpandOldGenerationOnAllocationFailure();
enum class IncrementalMarkingLimit { kNoLimit, kSoftLimit, kHardLimit };
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698