OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3831 space->ClearStats(); | 3831 space->ClearStats(); |
3832 | 3832 |
3833 PageIterator it(space); | 3833 PageIterator it(space); |
3834 | 3834 |
3835 intptr_t freed_bytes = 0; | 3835 intptr_t freed_bytes = 0; |
3836 int pages_swept = 0; | 3836 int pages_swept = 0; |
3837 intptr_t newspace_size = space->heap()->new_space()->Size(); | 3837 intptr_t newspace_size = space->heap()->new_space()->Size(); |
3838 bool lazy_sweeping_active = false; | 3838 bool lazy_sweeping_active = false; |
3839 bool unused_page_present = false; | 3839 bool unused_page_present = false; |
3840 | 3840 |
3841 intptr_t old_space_size = heap()->PromotedSpaceSize(); | 3841 intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects(); |
3842 intptr_t space_left = | 3842 intptr_t space_left = |
3843 Min(heap()->OldGenPromotionLimit(old_space_size), | 3843 Min(heap()->OldGenPromotionLimit(old_space_size), |
3844 heap()->OldGenAllocationLimit(old_space_size)) - old_space_size; | 3844 heap()->OldGenAllocationLimit(old_space_size)) - old_space_size; |
3845 | 3845 |
3846 while (it.has_next()) { | 3846 while (it.has_next()) { |
3847 Page* p = it.next(); | 3847 Page* p = it.next(); |
3848 | 3848 |
3849 // Clear sweeping flags indicating that marking bits are still intact. | 3849 // Clear sweeping flags indicating that marking bits are still intact. |
3850 p->ClearSweptPrecisely(); | 3850 p->ClearSweptPrecisely(); |
3851 p->ClearSweptConservatively(); | 3851 p->ClearSweptConservatively(); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4144 while (buffer != NULL) { | 4144 while (buffer != NULL) { |
4145 SlotsBuffer* next_buffer = buffer->next(); | 4145 SlotsBuffer* next_buffer = buffer->next(); |
4146 DeallocateBuffer(buffer); | 4146 DeallocateBuffer(buffer); |
4147 buffer = next_buffer; | 4147 buffer = next_buffer; |
4148 } | 4148 } |
4149 *buffer_address = NULL; | 4149 *buffer_address = NULL; |
4150 } | 4150 } |
4151 | 4151 |
4152 | 4152 |
4153 } } // namespace v8::internal | 4153 } } // namespace v8::internal |
OLD | NEW |