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

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

Issue 1038653003: Change halfway-to-the-max GC trigger to measure committed pages, not allocated objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix thinko Created 5 years, 8 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.cc ('k') | src/heap/mark-compact.h » ('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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 343
344 344
345 bool Heap::InOldDataSpace(Object* object) { 345 bool Heap::InOldDataSpace(Object* object) {
346 return InOldDataSpace(reinterpret_cast<Address>(object)); 346 return InOldDataSpace(reinterpret_cast<Address>(object));
347 } 347 }
348 348
349 349
350 bool Heap::OldGenerationAllocationLimitReached() { 350 bool Heap::OldGenerationAllocationLimitReached() {
351 if (!incremental_marking()->IsStopped()) return false; 351 if (!incremental_marking()->IsStopped()) return false;
352 return OldGenerationSpaceAvailable() < 0; 352 return OldGenerationSpaceAvailable() < 0 ||
353 old_generation_committed_memory_limit_ <
354 CommittedOldGenerationMemory();
353 } 355 }
354 356
355 357
356 bool Heap::ShouldBePromoted(Address old_address, int object_size) { 358 bool Heap::ShouldBePromoted(Address old_address, int object_size) {
357 NewSpacePage* page = NewSpacePage::FromAddress(old_address); 359 NewSpacePage* page = NewSpacePage::FromAddress(old_address);
358 Address age_mark = new_space_.age_mark(); 360 Address age_mark = new_space_.age_mark();
359 return page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) && 361 return page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) &&
360 (!page->ContainsLimit(age_mark) || old_address < age_mark); 362 (!page->ContainsLimit(age_mark) || old_address < age_mark);
361 } 363 }
362 364
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 735
734 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 736 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
735 for (Object** current = start; current < end; current++) { 737 for (Object** current = start; current < end; current++) {
736 CHECK((*current)->IsSmi()); 738 CHECK((*current)->IsSmi());
737 } 739 }
738 } 740 }
739 } 741 }
740 } // namespace v8::internal 742 } // namespace v8::internal
741 743
742 #endif // V8_HEAP_HEAP_INL_H_ 744 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698