| 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/v8.h" | 5 #include "src/v8.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.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 | 1391 |
| 1392 // We should only get here if someone asks to allocate more | 1392 // We should only get here if someone asks to allocate more |
| 1393 // than what can be stored in a single page. | 1393 // than what can be stored in a single page. |
| 1394 // TODO(gc): Change the limit on new-space allocation to prevent this | 1394 // TODO(gc): Change the limit on new-space allocation to prevent this |
| 1395 // from happening (all such allocations should go directly to LOSpace). | 1395 // from happening (all such allocations should go directly to LOSpace). |
| 1396 return false; | 1396 return false; |
| 1397 } | 1397 } |
| 1398 if (!to_space_.AdvancePage()) { | 1398 if (!to_space_.AdvancePage()) { |
| 1399 // Check if we reached the target capacity yet. If not, try to commit a page | 1399 // Check if we reached the target capacity yet. If not, try to commit a page |
| 1400 // and continue. | 1400 // and continue. |
| 1401 if ((to_space_.TotalCapacity() < to_space_.TargetCapacity()) && | 1401 if (grow_to_target_capacity_ && |
| 1402 (to_space_.TotalCapacity() < to_space_.TargetCapacity()) && |
| 1402 GrowOnePage()) { | 1403 GrowOnePage()) { |
| 1403 if (!to_space_.AdvancePage()) { | 1404 if (!to_space_.AdvancePage()) { |
| 1404 // It doesn't make sense that we managed to commit a page, but can't use | 1405 // It doesn't make sense that we managed to commit a page, but can't use |
| 1405 // it. | 1406 // it. |
| 1406 CHECK(false); | 1407 CHECK(false); |
| 1407 } | 1408 } |
| 1408 } else { | 1409 } else { |
| 1409 // Failed to get a new page in to-space. | 1410 // Failed to get a new page in to-space. |
| 1410 return false; | 1411 return false; |
| 1411 } | 1412 } |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3166 object->ShortPrint(); | 3167 object->ShortPrint(); |
| 3167 PrintF("\n"); | 3168 PrintF("\n"); |
| 3168 } | 3169 } |
| 3169 printf(" --------------------------------------\n"); | 3170 printf(" --------------------------------------\n"); |
| 3170 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3171 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3171 } | 3172 } |
| 3172 | 3173 |
| 3173 #endif // DEBUG | 3174 #endif // DEBUG |
| 3174 } | 3175 } |
| 3175 } // namespace v8::internal | 3176 } // namespace v8::internal |
| OLD | NEW |