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

Side by Side Diff: src/heap/heap-inl.h

Issue 2329993002: [heap] Decouple old generation allocation limit from external memory. (Closed)
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 Address* Heap::OldSpaceAllocationLimitAddress() { 186 Address* Heap::OldSpaceAllocationLimitAddress() {
187 return old_space_->allocation_limit_address(); 187 return old_space_->allocation_limit_address();
188 } 188 }
189 189
190 bool Heap::HeapIsFullEnoughToStartIncrementalMarking(intptr_t limit) { 190 bool Heap::HeapIsFullEnoughToStartIncrementalMarking(intptr_t limit) {
191 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; 191 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true;
192 192
193 intptr_t adjusted_allocation_limit = limit - new_space_->Capacity(); 193 intptr_t adjusted_allocation_limit = limit - new_space_->Capacity();
194 194
195 if (PromotedTotalSize() >= adjusted_allocation_limit) return true; 195 if (PromotedSpaceSizeOfObjects() >= adjusted_allocation_limit) return true;
196 196
197 if (HighMemoryPressure()) return true; 197 if (HighMemoryPressure()) return true;
198 198
199 return false; 199 return false;
200 } 200 }
201 201
202 void Heap::UpdateNewSpaceAllocationCounter() { 202 void Heap::UpdateNewSpaceAllocationCounter() {
203 new_space_allocation_counter_ = NewSpaceAllocationCounter(); 203 new_space_allocation_counter_ = NewSpaceAllocationCounter();
204 } 204 }
205 205
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 881
882 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 882 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
883 for (Object** current = start; current < end; current++) { 883 for (Object** current = start; current < end; current++) {
884 CHECK((*current)->IsSmi()); 884 CHECK((*current)->IsSmi());
885 } 885 }
886 } 886 }
887 } // namespace internal 887 } // namespace internal
888 } // namespace v8 888 } // namespace v8
889 889
890 #endif // V8_HEAP_HEAP_INL_H_ 890 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698