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

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

Issue 2225363002: [heap] Enforce finalization of marking at heap limit when optimizing for memory usage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [heap] Enforce finalization of marking at heap limit when optimizing for memory usage. Created 4 years, 4 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 | « no previous file | no next file » | 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 bool Heap::InNewSpaceSlow(Address address) { 378 bool Heap::InNewSpaceSlow(Address address) {
379 return new_space_.ContainsSlow(address); 379 return new_space_.ContainsSlow(address);
380 } 380 }
381 381
382 bool Heap::InOldSpaceSlow(Address address) { 382 bool Heap::InOldSpaceSlow(Address address) {
383 return old_space_->ContainsSlow(address); 383 return old_space_->ContainsSlow(address);
384 } 384 }
385 385
386 bool Heap::OldGenerationAllocationLimitReached() { 386 bool Heap::OldGenerationAllocationLimitReached() {
387 if (!incremental_marking()->IsStopped()) return false; 387 if (!incremental_marking()->IsStopped() && !ShouldOptimizeForMemoryUsage()) {
388 return false;
389 }
388 return OldGenerationSpaceAvailable() < 0; 390 return OldGenerationSpaceAvailable() < 0;
389 } 391 }
390 392
391 template <PromotionMode promotion_mode> 393 template <PromotionMode promotion_mode>
392 bool Heap::ShouldBePromoted(Address old_address, int object_size) { 394 bool Heap::ShouldBePromoted(Address old_address, int object_size) {
393 Page* page = Page::FromAddress(old_address); 395 Page* page = Page::FromAddress(old_address);
394 Address age_mark = new_space_.age_mark(); 396 Address age_mark = new_space_.age_mark();
395 397
396 if (promotion_mode == PROMOTE_MARKED) { 398 if (promotion_mode == PROMOTE_MARKED) {
397 MarkBit mark_bit = ObjectMarking::MarkBitFrom(old_address); 399 MarkBit mark_bit = ObjectMarking::MarkBitFrom(old_address);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 781
780 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 782 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
781 for (Object** current = start; current < end; current++) { 783 for (Object** current = start; current < end; current++) {
782 CHECK((*current)->IsSmi()); 784 CHECK((*current)->IsSmi());
783 } 785 }
784 } 786 }
785 } // namespace internal 787 } // namespace internal
786 } // namespace v8 788 } // namespace v8
787 789
788 #endif // V8_HEAP_HEAP_INL_H_ 790 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698