OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/heap/spaces.h" | 5 #include "src/heap/spaces.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
10 #include "src/heap/slot-set.h" | 10 #include "src/heap/slot-set.h" |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 | 1475 |
1476 // Clear remainder of current page. | 1476 // Clear remainder of current page. |
1477 Address limit = NewSpacePage::FromLimit(top)->area_end(); | 1477 Address limit = NewSpacePage::FromLimit(top)->area_end(); |
1478 if (heap()->gc_state() == Heap::SCAVENGE) { | 1478 if (heap()->gc_state() == Heap::SCAVENGE) { |
1479 heap()->promotion_queue()->SetNewLimit(limit); | 1479 heap()->promotion_queue()->SetNewLimit(limit); |
1480 } | 1480 } |
1481 | 1481 |
1482 int remaining_in_page = static_cast<int>(limit - top); | 1482 int remaining_in_page = static_cast<int>(limit - top); |
1483 heap()->CreateFillerObjectAt(top, remaining_in_page, ClearRecordedSlots::kNo); | 1483 heap()->CreateFillerObjectAt(top, remaining_in_page, ClearRecordedSlots::kNo); |
1484 pages_used_++; | 1484 pages_used_++; |
| 1485 allocated_since_last_gc_ += NewSpacePage::kAllocatableMemory; |
1485 UpdateAllocationInfo(); | 1486 UpdateAllocationInfo(); |
1486 | 1487 |
1487 return true; | 1488 return true; |
1488 } | 1489 } |
1489 | 1490 |
1490 | 1491 |
1491 bool NewSpace::AddFreshPageSynchronized() { | 1492 bool NewSpace::AddFreshPageSynchronized() { |
1492 base::LockGuard<base::Mutex> guard(&mutex_); | 1493 base::LockGuard<base::Mutex> guard(&mutex_); |
1493 return AddFreshPage(); | 1494 return AddFreshPage(); |
1494 } | 1495 } |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 object->ShortPrint(); | 3128 object->ShortPrint(); |
3128 PrintF("\n"); | 3129 PrintF("\n"); |
3129 } | 3130 } |
3130 printf(" --------------------------------------\n"); | 3131 printf(" --------------------------------------\n"); |
3131 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3132 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3132 } | 3133 } |
3133 | 3134 |
3134 #endif // DEBUG | 3135 #endif // DEBUG |
3135 } // namespace internal | 3136 } // namespace internal |
3136 } // namespace v8 | 3137 } // namespace v8 |
OLD | NEW |