| Index: src/heap/heap-inl.h
|
| diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
|
| index 4ec176b51df40f25a804d541769fb06eebb78a39..b5d785ff8deecce4ecfd0872f6312f29abd2744b 100644
|
| --- a/src/heap/heap-inl.h
|
| +++ b/src/heap/heap-inl.h
|
| @@ -167,6 +167,18 @@
|
|
|
| Address* Heap::OldSpaceAllocationLimitAddress() {
|
| return old_space_->allocation_limit_address();
|
| +}
|
| +
|
| +bool Heap::HeapIsFullEnoughToStartIncrementalMarking(intptr_t limit) {
|
| + if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true;
|
| +
|
| + intptr_t adjusted_allocation_limit = limit - new_space_->Capacity();
|
| +
|
| + if (PromotedTotalSize() >= adjusted_allocation_limit) return true;
|
| +
|
| + if (HighMemoryPressure()) return true;
|
| +
|
| + return false;
|
| }
|
|
|
| void Heap::UpdateNewSpaceAllocationCounter() {
|
| @@ -478,6 +490,13 @@
|
|
|
| bool Heap::InOldSpaceSlow(Address address) {
|
| return old_space_->ContainsSlow(address);
|
| +}
|
| +
|
| +bool Heap::OldGenerationAllocationLimitReached() {
|
| + if (!incremental_marking()->IsStopped() && !ShouldOptimizeForMemoryUsage()) {
|
| + return false;
|
| + }
|
| + return OldGenerationSpaceAvailable() < 0;
|
| }
|
|
|
| template <PromotionMode promotion_mode>
|
|
|