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 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2509 new_node->address() + size_in_bytes, | 2509 new_node->address() + size_in_bytes, |
2510 new_node->address() + size_in_bytes + linear_size); | 2510 new_node->address() + size_in_bytes + linear_size); |
2511 } else { | 2511 } else { |
2512 DCHECK(bytes_left >= 0); | 2512 DCHECK(bytes_left >= 0); |
2513 // Normally we give the rest of the node to the allocator as its new | 2513 // Normally we give the rest of the node to the allocator as its new |
2514 // linear allocation area. | 2514 // linear allocation area. |
2515 owner_->SetAllocationInfo(new_node->address() + size_in_bytes, | 2515 owner_->SetAllocationInfo(new_node->address() + size_in_bytes, |
2516 new_node->address() + new_node_size); | 2516 new_node->address() + new_node_size); |
2517 } | 2517 } |
2518 | 2518 |
2519 owner_->AllocationStep(new_node->address(), size_in_bytes); | |
2520 | |
2521 return new_node; | 2519 return new_node; |
2522 } | 2520 } |
2523 | 2521 |
2524 intptr_t FreeList::EvictFreeListItems(Page* page) { | 2522 intptr_t FreeList::EvictFreeListItems(Page* page) { |
2525 intptr_t sum = 0; | 2523 intptr_t sum = 0; |
2526 page->ForAllFreeListCategories( | 2524 page->ForAllFreeListCategories( |
2527 [this, &sum, page](FreeListCategory* category) { | 2525 [this, &sum, page](FreeListCategory* category) { |
2528 DCHECK_EQ(this, category->owner()); | 2526 DCHECK_EQ(this, category->owner()); |
2529 sum += category->available(); | 2527 sum += category->available(); |
2530 RemoveCategory(category); | 2528 RemoveCategory(category); |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3134 object->ShortPrint(); | 3132 object->ShortPrint(); |
3135 PrintF("\n"); | 3133 PrintF("\n"); |
3136 } | 3134 } |
3137 printf(" --------------------------------------\n"); | 3135 printf(" --------------------------------------\n"); |
3138 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3136 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3139 } | 3137 } |
3140 | 3138 |
3141 #endif // DEBUG | 3139 #endif // DEBUG |
3142 } // namespace internal | 3140 } // namespace internal |
3143 } // namespace v8 | 3141 } // namespace v8 |
OLD | NEW |