OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |