| 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 3084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3095 LargePage* page = current; | 3095 LargePage* page = current; |
| 3096 // Cut the chunk out from the chunk list. | 3096 // Cut the chunk out from the chunk list. |
| 3097 current = current->next_page(); | 3097 current = current->next_page(); |
| 3098 if (previous == NULL) { | 3098 if (previous == NULL) { |
| 3099 first_page_ = current; | 3099 first_page_ = current; |
| 3100 } else { | 3100 } else { |
| 3101 previous->set_next_page(current); | 3101 previous->set_next_page(current); |
| 3102 } | 3102 } |
| 3103 | 3103 |
| 3104 // Free the chunk. | 3104 // Free the chunk. |
| 3105 heap()->mark_compact_collector()->ReportDeleteIfNeeded(object, | |
| 3106 heap()->isolate()); | |
| 3107 size_ -= static_cast<int>(page->size()); | 3105 size_ -= static_cast<int>(page->size()); |
| 3108 AccountUncommitted(static_cast<intptr_t>(page->size())); | 3106 AccountUncommitted(static_cast<intptr_t>(page->size())); |
| 3109 objects_size_ -= object->Size(); | 3107 objects_size_ -= object->Size(); |
| 3110 page_count_--; | 3108 page_count_--; |
| 3111 | 3109 |
| 3112 // Remove entries belonging to this page. | 3110 // Remove entries belonging to this page. |
| 3113 // Use variable alignment to help pass length check (<= 80 characters) | 3111 // Use variable alignment to help pass length check (<= 80 characters) |
| 3114 // of single line in tools/presubmit.py. | 3112 // of single line in tools/presubmit.py. |
| 3115 const intptr_t alignment = MemoryChunk::kAlignment; | 3113 const intptr_t alignment = MemoryChunk::kAlignment; |
| 3116 uintptr_t base = reinterpret_cast<uintptr_t>(page) / alignment; | 3114 uintptr_t base = reinterpret_cast<uintptr_t>(page) / alignment; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3244 object->ShortPrint(); | 3242 object->ShortPrint(); |
| 3245 PrintF("\n"); | 3243 PrintF("\n"); |
| 3246 } | 3244 } |
| 3247 printf(" --------------------------------------\n"); | 3245 printf(" --------------------------------------\n"); |
| 3248 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3246 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3249 } | 3247 } |
| 3250 | 3248 |
| 3251 #endif // DEBUG | 3249 #endif // DEBUG |
| 3252 } // namespace internal | 3250 } // namespace internal |
| 3253 } // namespace v8 | 3251 } // namespace v8 |
| OLD | NEW |