| 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 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3538 Address start, | 3538 Address start, |
| 3539 int size) { | 3539 int size) { |
| 3540 if (mode == MarkCompactCollector::SWEEP_SEQUENTIALLY) { | 3540 if (mode == MarkCompactCollector::SWEEP_SEQUENTIALLY) { |
| 3541 return space->Free(start, size); | 3541 return space->Free(start, size); |
| 3542 } else { | 3542 } else { |
| 3543 return size - free_list->Free(start, size); | 3543 return size - free_list->Free(start, size); |
| 3544 } | 3544 } |
| 3545 } | 3545 } |
| 3546 | 3546 |
| 3547 | 3547 |
| 3548 // Force instantiation of templatized SweepConservatively method for |
| 3549 // SWEEP_SEQUENTIALLY mode. |
| 3550 template intptr_t MarkCompactCollector:: |
| 3551 SweepConservatively<MarkCompactCollector::SWEEP_SEQUENTIALLY>( |
| 3552 PagedSpace*, FreeList*, Page*); |
| 3553 |
| 3554 |
| 3555 // Force instantiation of templatized SweepConservatively method for |
| 3556 // SWEEP_IN_PARALLEL mode. |
| 3557 template intptr_t MarkCompactCollector:: |
| 3558 SweepConservatively<MarkCompactCollector::SWEEP_IN_PARALLEL>( |
| 3559 PagedSpace*, FreeList*, Page*); |
| 3560 |
| 3561 |
| 3548 // Sweeps a space conservatively. After this has been done the larger free | 3562 // Sweeps a space conservatively. After this has been done the larger free |
| 3549 // spaces have been put on the free list and the smaller ones have been | 3563 // spaces have been put on the free list and the smaller ones have been |
| 3550 // ignored and left untouched. A free space is always either ignored or put | 3564 // ignored and left untouched. A free space is always either ignored or put |
| 3551 // on the free list, never split up into two parts. This is important | 3565 // on the free list, never split up into two parts. This is important |
| 3552 // because it means that any FreeSpace maps left actually describe a region of | 3566 // because it means that any FreeSpace maps left actually describe a region of |
| 3553 // memory that can be ignored when scanning. Dead objects other than free | 3567 // memory that can be ignored when scanning. Dead objects other than free |
| 3554 // spaces will not contain the free space map. | 3568 // spaces will not contain the free space map. |
| 3555 template<MarkCompactCollector::SweepingParallelism mode> | 3569 template<MarkCompactCollector::SweepingParallelism mode> |
| 3556 intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space, | 3570 intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space, |
| 3557 FreeList* free_list, | 3571 FreeList* free_list, |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4017 while (buffer != NULL) { | 4031 while (buffer != NULL) { |
| 4018 SlotsBuffer* next_buffer = buffer->next(); | 4032 SlotsBuffer* next_buffer = buffer->next(); |
| 4019 DeallocateBuffer(buffer); | 4033 DeallocateBuffer(buffer); |
| 4020 buffer = next_buffer; | 4034 buffer = next_buffer; |
| 4021 } | 4035 } |
| 4022 *buffer_address = NULL; | 4036 *buffer_address = NULL; |
| 4023 } | 4037 } |
| 4024 | 4038 |
| 4025 | 4039 |
| 4026 } } // namespace v8::internal | 4040 } } // namespace v8::internal |
| OLD | NEW |