| 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 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3964 freed_bytes += Free<mode>(space, free_list, free_start, | 3964 freed_bytes += Free<mode>(space, free_list, free_start, |
| 3965 static_cast<int>(p->area_end() - free_start)); | 3965 static_cast<int>(p->area_end() - free_start)); |
| 3966 } | 3966 } |
| 3967 | 3967 |
| 3968 p->ResetLiveBytes(); | 3968 p->ResetLiveBytes(); |
| 3969 return freed_bytes; | 3969 return freed_bytes; |
| 3970 } | 3970 } |
| 3971 | 3971 |
| 3972 | 3972 |
| 3973 void MarkCompactCollector::SweepInParallel(PagedSpace* space, | 3973 void MarkCompactCollector::SweepInParallel(PagedSpace* space, |
| 3974 FreeList* private_free_list, | |
| 3975 FreeList* free_list) { | 3974 FreeList* free_list) { |
| 3976 PageIterator it(space); | 3975 PageIterator it(space); |
| 3976 FreeList private_free_list(space); |
| 3977 while (it.has_next()) { | 3977 while (it.has_next()) { |
| 3978 Page* p = it.next(); | 3978 Page* p = it.next(); |
| 3979 | 3979 |
| 3980 if (p->TryParallelSweeping()) { | 3980 if (p->TryParallelSweeping()) { |
| 3981 SweepConservatively<SWEEP_IN_PARALLEL>(space, private_free_list, p); | 3981 SweepConservatively<SWEEP_IN_PARALLEL>(space, &private_free_list, p); |
| 3982 free_list->Concatenate(private_free_list); | 3982 free_list->Concatenate(&private_free_list); |
| 3983 } | 3983 } |
| 3984 } | 3984 } |
| 3985 } | 3985 } |
| 3986 | 3986 |
| 3987 | 3987 |
| 3988 void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { | 3988 void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { |
| 3989 space->set_was_swept_conservatively(sweeper == CONSERVATIVE || | 3989 space->set_was_swept_conservatively(sweeper == CONSERVATIVE || |
| 3990 sweeper == LAZY_CONSERVATIVE || | 3990 sweeper == LAZY_CONSERVATIVE || |
| 3991 sweeper == PARALLEL_CONSERVATIVE || | 3991 sweeper == PARALLEL_CONSERVATIVE || |
| 3992 sweeper == CONCURRENT_CONSERVATIVE); | 3992 sweeper == CONCURRENT_CONSERVATIVE); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4369 while (buffer != NULL) { | 4369 while (buffer != NULL) { |
| 4370 SlotsBuffer* next_buffer = buffer->next(); | 4370 SlotsBuffer* next_buffer = buffer->next(); |
| 4371 DeallocateBuffer(buffer); | 4371 DeallocateBuffer(buffer); |
| 4372 buffer = next_buffer; | 4372 buffer = next_buffer; |
| 4373 } | 4373 } |
| 4374 *buffer_address = NULL; | 4374 *buffer_address = NULL; |
| 4375 } | 4375 } |
| 4376 | 4376 |
| 4377 | 4377 |
| 4378 } } // namespace v8::internal | 4378 } } // namespace v8::internal |
| OLD | NEW |