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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 chunk->set_owner(owner); | 528 chunk->set_owner(owner); |
529 chunk->InitializeReservedMemory(); | 529 chunk->InitializeReservedMemory(); |
530 chunk->slot_set_[OLD_TO_NEW].SetValue(nullptr); | 530 chunk->slot_set_[OLD_TO_NEW].SetValue(nullptr); |
531 chunk->slot_set_[OLD_TO_OLD].SetValue(nullptr); | 531 chunk->slot_set_[OLD_TO_OLD].SetValue(nullptr); |
532 chunk->typed_slot_set_[OLD_TO_NEW].SetValue(nullptr); | 532 chunk->typed_slot_set_[OLD_TO_NEW].SetValue(nullptr); |
533 chunk->typed_slot_set_[OLD_TO_OLD].SetValue(nullptr); | 533 chunk->typed_slot_set_[OLD_TO_OLD].SetValue(nullptr); |
534 chunk->skip_list_ = nullptr; | 534 chunk->skip_list_ = nullptr; |
535 chunk->progress_bar_ = 0; | 535 chunk->progress_bar_ = 0; |
536 chunk->high_water_mark_.SetValue(static_cast<intptr_t>(area_start - base)); | 536 chunk->high_water_mark_.SetValue(static_cast<intptr_t>(area_start - base)); |
537 chunk->concurrent_sweeping_state().SetValue(kSweepingDone); | 537 chunk->concurrent_sweeping_state().SetValue(kSweepingDone); |
538 chunk->mutex_ = new base::Mutex(); | 538 chunk->mutex_ = new base::RecursiveMutex(); |
539 chunk->available_in_free_list_ = 0; | 539 chunk->available_in_free_list_ = 0; |
540 chunk->wasted_memory_ = 0; | 540 chunk->wasted_memory_ = 0; |
541 chunk->young_generation_bitmap_ = nullptr; | 541 chunk->young_generation_bitmap_ = nullptr; |
542 chunk->set_next_chunk(nullptr); | 542 chunk->set_next_chunk(nullptr); |
543 chunk->set_prev_chunk(nullptr); | 543 chunk->set_prev_chunk(nullptr); |
544 chunk->local_tracker_ = nullptr; | 544 chunk->local_tracker_ = nullptr; |
545 | 545 |
546 MarkingState::Internal(chunk).ClearLiveness(); | 546 MarkingState::Internal(chunk).ClearLiveness(); |
547 | 547 |
548 DCHECK(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); | 548 DCHECK(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); |
(...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3314 PrintF("\n"); | 3314 PrintF("\n"); |
3315 } | 3315 } |
3316 printf(" --------------------------------------\n"); | 3316 printf(" --------------------------------------\n"); |
3317 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, | 3317 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, |
3318 MarkingState::Internal(this).live_bytes()); | 3318 MarkingState::Internal(this).live_bytes()); |
3319 } | 3319 } |
3320 | 3320 |
3321 #endif // DEBUG | 3321 #endif // DEBUG |
3322 } // namespace internal | 3322 } // namespace internal |
3323 } // namespace v8 | 3323 } // namespace v8 |
OLD | NEW |