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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1405 InlineAllocationStep(old_top, allocation_info_.top()); | 1405 InlineAllocationStep(old_top, allocation_info_.top()); |
1406 } | 1406 } |
1407 | 1407 |
1408 | 1408 |
1409 void NewSpace::UpdateInlineAllocationLimit(int size_in_bytes) { | 1409 void NewSpace::UpdateInlineAllocationLimit(int size_in_bytes) { |
1410 if (heap()->inline_allocation_disabled()) { | 1410 if (heap()->inline_allocation_disabled()) { |
1411 // Lowest limit when linear allocation was disabled. | 1411 // Lowest limit when linear allocation was disabled. |
1412 Address high = to_space_.page_high(); | 1412 Address high = to_space_.page_high(); |
1413 Address new_top = allocation_info_.top() + size_in_bytes; | 1413 Address new_top = allocation_info_.top() + size_in_bytes; |
1414 allocation_info_.set_limit(Min(new_top, high)); | 1414 allocation_info_.set_limit(Min(new_top, high)); |
1415 } else if (inline_allocation_limit_step_ == 0) { | 1415 } else if (top_on_previous_step_ == 0) { |
ofrobots
2015/10/12 22:39:42
I did not need to make this change as part of this
| |
1416 // Normal limit is the end of the current page. | 1416 // Normal limit is the end of the current page. |
1417 allocation_info_.set_limit(to_space_.page_high()); | 1417 allocation_info_.set_limit(to_space_.page_high()); |
1418 } else { | 1418 } else { |
1419 // Lower limit during incremental marking. | 1419 // Lower limit during incremental marking. |
1420 Address high = to_space_.page_high(); | 1420 Address high = to_space_.page_high(); |
1421 Address new_top = allocation_info_.top() + size_in_bytes; | 1421 Address new_top = allocation_info_.top() + size_in_bytes; |
1422 Address new_limit = new_top + inline_allocation_limit_step_; | 1422 Address new_limit = new_top + inline_allocation_limit_step_; |
1423 allocation_info_.set_limit(Min(new_limit, high)); | 1423 allocation_info_.set_limit(Min(new_limit, high)); |
1424 } | 1424 } |
1425 DCHECK_SEMISPACE_ALLOCATION_INFO(allocation_info_, to_space_); | 1425 DCHECK_SEMISPACE_ALLOCATION_INFO(allocation_info_, to_space_); |
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3158 object->ShortPrint(); | 3158 object->ShortPrint(); |
3159 PrintF("\n"); | 3159 PrintF("\n"); |
3160 } | 3160 } |
3161 printf(" --------------------------------------\n"); | 3161 printf(" --------------------------------------\n"); |
3162 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3162 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3163 } | 3163 } |
3164 | 3164 |
3165 #endif // DEBUG | 3165 #endif // DEBUG |
3166 } // namespace internal | 3166 } // namespace internal |
3167 } // namespace v8 | 3167 } // namespace v8 |
OLD | NEW |