| 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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 owner_->heap()->incremental_marking()->IsMarkingIncomplete() && | 2479 owner_->heap()->incremental_marking()->IsMarkingIncomplete() && |
| 2480 FLAG_incremental_marking) { | 2480 FLAG_incremental_marking) { |
| 2481 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold); | 2481 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold); |
| 2482 // We don't want to give too large linear areas to the allocator while | 2482 // We don't want to give too large linear areas to the allocator while |
| 2483 // incremental marking is going on, because we won't check again whether | 2483 // incremental marking is going on, because we won't check again whether |
| 2484 // we want to do another increment until the linear area is used up. | 2484 // we want to do another increment until the linear area is used up. |
| 2485 owner_->Free(new_node->address() + size_in_bytes + linear_size, | 2485 owner_->Free(new_node->address() + size_in_bytes + linear_size, |
| 2486 new_node_size - size_in_bytes - linear_size); | 2486 new_node_size - size_in_bytes - linear_size); |
| 2487 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, | 2487 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, |
| 2488 new_node->address() + size_in_bytes + linear_size); | 2488 new_node->address() + size_in_bytes + linear_size); |
| 2489 } else if (bytes_left >= 0) { | 2489 } else { |
| 2490 DCHECK(bytes_left >= 0); |
| 2490 // Normally we give the rest of the node to the allocator as its new | 2491 // Normally we give the rest of the node to the allocator as its new |
| 2491 // linear allocation area. | 2492 // linear allocation area. |
| 2492 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, | 2493 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, |
| 2493 new_node->address() + new_node_size); | 2494 new_node->address() + new_node_size); |
| 2494 } | 2495 } |
| 2495 | 2496 |
| 2496 owner_->AllocationStep(new_node->address(), size_in_bytes); | 2497 owner_->AllocationStep(new_node->address(), size_in_bytes); |
| 2497 | 2498 |
| 2498 return new_node; | 2499 return new_node; |
| 2499 } | 2500 } |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3225 object->ShortPrint(); | 3226 object->ShortPrint(); |
| 3226 PrintF("\n"); | 3227 PrintF("\n"); |
| 3227 } | 3228 } |
| 3228 printf(" --------------------------------------\n"); | 3229 printf(" --------------------------------------\n"); |
| 3229 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3230 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3230 } | 3231 } |
| 3231 | 3232 |
| 3232 #endif // DEBUG | 3233 #endif // DEBUG |
| 3233 } // namespace internal | 3234 } // namespace internal |
| 3234 } // namespace v8 | 3235 } // namespace v8 |
| OLD | NEW |