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 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 | 2538 |
2539 allocation_info_.top = NULL; | 2539 allocation_info_.top = NULL; |
2540 allocation_info_.limit = NULL; | 2540 allocation_info_.limit = NULL; |
2541 } | 2541 } |
2542 } | 2542 } |
2543 | 2543 |
2544 | 2544 |
2545 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { | 2545 bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { |
2546 MarkCompactCollector* collector = heap()->mark_compact_collector(); | 2546 MarkCompactCollector* collector = heap()->mark_compact_collector(); |
2547 if (collector->AreSweeperThreadsActivated()) { | 2547 if (collector->AreSweeperThreadsActivated()) { |
2548 if (FLAG_concurrent_sweeping) { | 2548 if (collector->IsConcurrentSweepingInProgress()) { |
2549 if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { | 2549 if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { |
2550 collector->WaitUntilSweepingCompleted(); | 2550 collector->WaitUntilSweepingCompleted(); |
2551 collector->FinalizeSweeping(); | 2551 collector->FinalizeSweeping(); |
2552 return true; | 2552 return true; |
2553 } | 2553 } |
2554 return false; | 2554 return false; |
2555 } | 2555 } |
2556 return true; | 2556 return true; |
2557 } else { | 2557 } else { |
2558 return AdvanceSweeper(size_in_bytes); | 2558 return AdvanceSweeper(size_in_bytes); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3122 object->ShortPrint(); | 3122 object->ShortPrint(); |
3123 PrintF("\n"); | 3123 PrintF("\n"); |
3124 } | 3124 } |
3125 printf(" --------------------------------------\n"); | 3125 printf(" --------------------------------------\n"); |
3126 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3126 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3127 } | 3127 } |
3128 | 3128 |
3129 #endif // DEBUG | 3129 #endif // DEBUG |
3130 | 3130 |
3131 } } // namespace v8::internal | 3131 } } // namespace v8::internal |
OLD | NEW |