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/base/platform/semaphore.h" | 9 #include "src/base/platform/semaphore.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2944 } | 2944 } |
2945 size_t used_size = RoundUp((object->address() - address()) + object->Size(), | 2945 size_t used_size = RoundUp((object->address() - address()) + object->Size(), |
2946 base::OS::CommitPageSize()); | 2946 base::OS::CommitPageSize()); |
2947 if (used_size < CommittedPhysicalMemory()) { | 2947 if (used_size < CommittedPhysicalMemory()) { |
2948 return address() + used_size; | 2948 return address() + used_size; |
2949 } | 2949 } |
2950 return 0; | 2950 return 0; |
2951 } | 2951 } |
2952 | 2952 |
2953 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) { | 2953 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) { |
2954 if (old_to_new_slots() != nullptr) { | 2954 RememberedSet<OLD_TO_NEW>::RemoveRange(this, free_start, area_end()); |
2955 old_to_new_slots()->RemoveRange( | 2955 RememberedSet<OLD_TO_OLD>::RemoveRange(this, free_start, area_end()); |
2956 static_cast<int>(free_start - address()), | 2956 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(this, free_start, area_end()); |
2957 static_cast<int>(free_start + size() - address())); | 2957 RememberedSet<OLD_TO_OLD>::RemoveRangeTyped(this, free_start, area_end()); |
2958 } | |
2959 if (old_to_old_slots() != nullptr) { | |
2960 old_to_old_slots()->RemoveRange( | |
2961 static_cast<int>(free_start - address()), | |
2962 static_cast<int>(free_start + size() - address())); | |
2963 } | |
2964 } | 2958 } |
2965 | 2959 |
2966 // ----------------------------------------------------------------------------- | 2960 // ----------------------------------------------------------------------------- |
2967 // LargeObjectIterator | 2961 // LargeObjectIterator |
2968 | 2962 |
2969 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { | 2963 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { |
2970 current_ = space->first_page_; | 2964 current_ = space->first_page_; |
2971 } | 2965 } |
2972 | 2966 |
2973 | 2967 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3291 object->ShortPrint(); | 3285 object->ShortPrint(); |
3292 PrintF("\n"); | 3286 PrintF("\n"); |
3293 } | 3287 } |
3294 printf(" --------------------------------------\n"); | 3288 printf(" --------------------------------------\n"); |
3295 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3289 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3296 } | 3290 } |
3297 | 3291 |
3298 #endif // DEBUG | 3292 #endif // DEBUG |
3299 } // namespace internal | 3293 } // namespace internal |
3300 } // namespace v8 | 3294 } // namespace v8 |
OLD | NEW |