| 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/slots-buffer.h" | 10 #include "src/heap/slots-buffer.h" |
| (...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 return false; | 2228 return false; |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 | 2231 |
| 2232 FreeSpace* FreeListCategory::PickNodeFromList(int* node_size) { | 2232 FreeSpace* FreeListCategory::PickNodeFromList(int* node_size) { |
| 2233 FreeSpace* node = top(); | 2233 FreeSpace* node = top(); |
| 2234 if (node == nullptr) return nullptr; | 2234 if (node == nullptr) return nullptr; |
| 2235 | 2235 |
| 2236 Page* page = Page::FromAddress(node->address()); | 2236 Page* page = Page::FromAddress(node->address()); |
| 2237 while ((node != nullptr) && page->IsEvacuationCandidate()) { | 2237 while ((node != nullptr) && page->IsEvacuationCandidate()) { |
| 2238 available_ -= node->Size(); | 2238 available_ -= node->size(); |
| 2239 page->add_available_in_free_list(type_, -(node->Size())); | 2239 page->add_available_in_free_list(type_, -(node->Size())); |
| 2240 node = node->next(); | 2240 node = node->next(); |
| 2241 } | 2241 } |
| 2242 | 2242 |
| 2243 if (node != nullptr) { | 2243 if (node != nullptr) { |
| 2244 set_top(node->next()); | 2244 set_top(node->next()); |
| 2245 *node_size = node->Size(); | 2245 *node_size = node->Size(); |
| 2246 available_ -= *node_size; | 2246 available_ -= *node_size; |
| 2247 } else { | 2247 } else { |
| 2248 set_top(nullptr); | 2248 set_top(nullptr); |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3267 object->ShortPrint(); | 3267 object->ShortPrint(); |
| 3268 PrintF("\n"); | 3268 PrintF("\n"); |
| 3269 } | 3269 } |
| 3270 printf(" --------------------------------------\n"); | 3270 printf(" --------------------------------------\n"); |
| 3271 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3271 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3272 } | 3272 } |
| 3273 | 3273 |
| 3274 #endif // DEBUG | 3274 #endif // DEBUG |
| 3275 } // namespace internal | 3275 } // namespace internal |
| 3276 } // namespace v8 | 3276 } // namespace v8 |
| OLD | NEW |