| 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 #ifndef V8_HEAP_SPACES_INL_H_ | 5 #ifndef V8_HEAP_SPACES_INL_H_ |
| 6 #define V8_HEAP_SPACES_INL_H_ | 6 #define V8_HEAP_SPACES_INL_H_ |
| 7 | 7 |
| 8 #include "src/heap/incremental-marking.h" | 8 #include "src/heap/incremental-marking.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| 11 #include "src/msan.h" | 11 #include "src/msan.h" |
| 12 #include "src/profiler/heap-profiler.h" | 12 #include "src/profiler/heap-profiler.h" |
| 13 #include "src/v8memory.h" | 13 #include "src/v8memory.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 | 18 |
| 19 // ----------------------------------------------------------------------------- | 19 // ----------------------------------------------------------------------------- |
| 20 // Bitmap | 20 // Bitmap |
| 21 | 21 |
| 22 void Bitmap::Clear(MemoryChunk* chunk) { | 22 void Bitmap::Clear(MemoryChunk* chunk) { |
| 23 Bitmap* bitmap = chunk->markbits(); | 23 Bitmap* bitmap = chunk->markbits(); |
| 24 for (int i = 0; i < bitmap->CellsCount(); i++) bitmap->cells()[i] = 0; | 24 for (int i = 0; i < bitmap->CellsCount(); i++) bitmap->cells()[i] = 0; |
| 25 chunk->ResetLiveBytes(); | 25 chunk->ResetLiveBytes(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void Bitmap::SetAllBits(MemoryChunk* chunk) { |
| 29 Bitmap* bitmap = chunk->markbits(); |
| 30 for (int i = 0; i < bitmap->CellsCount(); i++) |
| 31 bitmap->cells()[i] = 0xffffffff; |
| 32 } |
| 28 | 33 |
| 29 // ----------------------------------------------------------------------------- | 34 // ----------------------------------------------------------------------------- |
| 30 // PageIterator | 35 // PageIterator |
| 31 | 36 |
| 32 PageIterator::PageIterator(PagedSpace* space) | 37 PageIterator::PageIterator(PagedSpace* space) |
| 33 : space_(space), | 38 : space_(space), |
| 34 prev_page_(&space->anchor_), | 39 prev_page_(&space->anchor_), |
| 35 next_page_(prev_page_->next_page()) {} | 40 next_page_(prev_page_->next_page()) {} |
| 36 | 41 |
| 37 | 42 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 other->allocation_info_.Reset(nullptr, nullptr); | 549 other->allocation_info_.Reset(nullptr, nullptr); |
| 545 return true; | 550 return true; |
| 546 } | 551 } |
| 547 return false; | 552 return false; |
| 548 } | 553 } |
| 549 | 554 |
| 550 } // namespace internal | 555 } // namespace internal |
| 551 } // namespace v8 | 556 } // namespace v8 |
| 552 | 557 |
| 553 #endif // V8_HEAP_SPACES_INL_H_ | 558 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |