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 }; |