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 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2571 } | 2571 } |
2572 } | 2572 } |
2573 | 2573 |
2574 | 2574 |
2575 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { | 2575 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { |
2576 MarkCompactCollector* collector = heap()->mark_compact_collector(); | 2576 MarkCompactCollector* collector = heap()->mark_compact_collector(); |
2577 if (collector->AreSweeperThreadsActivated()) { | 2577 if (collector->AreSweeperThreadsActivated()) { |
2578 if (FLAG_concurrent_sweeping) { | 2578 if (FLAG_concurrent_sweeping) { |
2579 if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { | 2579 if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { |
2580 collector->WaitUntilSweepingCompleted(); | 2580 collector->WaitUntilSweepingCompleted(); |
| 2581 collector->FinalizeSweeping(); |
2581 return true; | 2582 return true; |
2582 } | 2583 } |
2583 return false; | 2584 return false; |
2584 } | 2585 } |
2585 return true; | 2586 return true; |
2586 } else { | 2587 } else { |
2587 return AdvanceSweeper(size_in_bytes); | 2588 return AdvanceSweeper(size_in_bytes); |
2588 } | 2589 } |
2589 } | 2590 } |
2590 | 2591 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3151 object->ShortPrint(); | 3152 object->ShortPrint(); |
3152 PrintF("\n"); | 3153 PrintF("\n"); |
3153 } | 3154 } |
3154 printf(" --------------------------------------\n"); | 3155 printf(" --------------------------------------\n"); |
3155 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3156 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3156 } | 3157 } |
3157 | 3158 |
3158 #endif // DEBUG | 3159 #endif // DEBUG |
3159 | 3160 |
3160 } } // namespace v8::internal | 3161 } } // namespace v8::internal |
OLD | NEW |