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 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 LargePage* previous = NULL; | 3119 LargePage* previous = NULL; |
3120 LargePage* current = first_page_; | 3120 LargePage* current = first_page_; |
3121 while (current != NULL) { | 3121 while (current != NULL) { |
3122 HeapObject* object = current->GetObject(); | 3122 HeapObject* object = current->GetObject(); |
3123 MarkBit mark_bit = Marking::MarkBitFrom(object); | 3123 MarkBit mark_bit = Marking::MarkBitFrom(object); |
3124 DCHECK(!Marking::IsGrey(mark_bit)); | 3124 DCHECK(!Marking::IsGrey(mark_bit)); |
3125 if (Marking::IsBlack(mark_bit)) { | 3125 if (Marking::IsBlack(mark_bit)) { |
3126 Address free_start; | 3126 Address free_start; |
3127 if ((free_start = current->GetAddressToShrink()) != 0) { | 3127 if ((free_start = current->GetAddressToShrink()) != 0) { |
3128 // TODO(hpayer): Perform partial free concurrently. | 3128 // TODO(hpayer): Perform partial free concurrently. |
| 3129 RemoveChunkMapEntries(current, free_start); |
3129 heap()->memory_allocator()->PartialFreeMemory(current, free_start); | 3130 heap()->memory_allocator()->PartialFreeMemory(current, free_start); |
3130 RemoveChunkMapEntries(current, free_start); | |
3131 } | 3131 } |
3132 previous = current; | 3132 previous = current; |
3133 current = current->next_page(); | 3133 current = current->next_page(); |
3134 } else { | 3134 } else { |
3135 LargePage* page = current; | 3135 LargePage* page = current; |
3136 // Cut the chunk out from the chunk list. | 3136 // Cut the chunk out from the chunk list. |
3137 current = current->next_page(); | 3137 current = current->next_page(); |
3138 if (previous == NULL) { | 3138 if (previous == NULL) { |
3139 first_page_ = current; | 3139 first_page_ = current; |
3140 } else { | 3140 } else { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 object->ShortPrint(); | 3274 object->ShortPrint(); |
3275 PrintF("\n"); | 3275 PrintF("\n"); |
3276 } | 3276 } |
3277 printf(" --------------------------------------\n"); | 3277 printf(" --------------------------------------\n"); |
3278 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3278 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3279 } | 3279 } |
3280 | 3280 |
3281 #endif // DEBUG | 3281 #endif // DEBUG |
3282 } // namespace internal | 3282 } // namespace internal |
3283 } // namespace v8 | 3283 } // namespace v8 |
OLD | NEW |