OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 allocation_info_.set_top(NULL); | 2605 allocation_info_.set_top(NULL); |
2606 allocation_info_.set_limit(NULL); | 2606 allocation_info_.set_limit(NULL); |
2607 } | 2607 } |
2608 } | 2608 } |
2609 | 2609 |
2610 | 2610 |
2611 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { | 2611 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { |
2612 MarkCompactCollector* collector = heap()->mark_compact_collector(); | 2612 MarkCompactCollector* collector = heap()->mark_compact_collector(); |
2613 if (collector->AreSweeperThreadsActivated()) { | 2613 if (collector->AreSweeperThreadsActivated()) { |
2614 if (collector->IsConcurrentSweepingInProgress()) { | 2614 if (collector->IsConcurrentSweepingInProgress()) { |
2615 if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { | 2615 if (collector->RefillFreeLists(this) < size_in_bytes) { |
2616 if (!collector->sequential_sweeping()) { | 2616 if (!collector->sequential_sweeping()) { |
2617 collector->WaitUntilSweepingCompleted(); | 2617 collector->WaitUntilSweepingCompleted(); |
2618 return true; | 2618 return true; |
2619 } | 2619 } |
2620 } | 2620 } |
2621 return false; | 2621 return false; |
2622 } | 2622 } |
2623 return true; | 2623 return true; |
2624 } else { | 2624 } else { |
2625 return AdvanceSweeper(size_in_bytes); | 2625 return AdvanceSweeper(size_in_bytes); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 object->ShortPrint(); | 3178 object->ShortPrint(); |
3179 PrintF("\n"); | 3179 PrintF("\n"); |
3180 } | 3180 } |
3181 printf(" --------------------------------------\n"); | 3181 printf(" --------------------------------------\n"); |
3182 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3182 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3183 } | 3183 } |
3184 | 3184 |
3185 #endif // DEBUG | 3185 #endif // DEBUG |
3186 | 3186 |
3187 } } // namespace v8::internal | 3187 } } // namespace v8::internal |
OLD | NEW |