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 3529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3540 } | 3540 } |
3541 | 3541 |
3542 switch (sweeper) { | 3542 switch (sweeper) { |
3543 case CONSERVATIVE: { | 3543 case CONSERVATIVE: { |
3544 SweepConservatively(space, p); | 3544 SweepConservatively(space, p); |
3545 break; | 3545 break; |
3546 } | 3546 } |
3547 case LAZY_CONSERVATIVE: { | 3547 case LAZY_CONSERVATIVE: { |
3548 freed_bytes += SweepConservatively(space, p); | 3548 freed_bytes += SweepConservatively(space, p); |
3549 if (freed_bytes >= newspace_size && p != space->LastPage()) { | 3549 if (freed_bytes >= newspace_size && p != space->LastPage()) { |
3550 space->SetPagesToSweep(p->next_page(), space->anchor()); | 3550 space->SetPagesToSweep(p->next_page()); |
3551 lazy_sweeping_active = true; | 3551 lazy_sweeping_active = true; |
3552 } | 3552 } |
3553 break; | 3553 break; |
3554 } | 3554 } |
3555 case PRECISE: { | 3555 case PRECISE: { |
3556 if (space->identity() == CODE_SPACE) { | 3556 if (space->identity() == CODE_SPACE) { |
3557 SweepPrecisely<SWEEP_ONLY, REBUILD_SKIP_LIST>(space, p, NULL); | 3557 SweepPrecisely<SWEEP_ONLY, REBUILD_SKIP_LIST>(space, p, NULL); |
3558 } else { | 3558 } else { |
3559 SweepPrecisely<SWEEP_ONLY, IGNORE_SKIP_LIST>(space, p, NULL); | 3559 SweepPrecisely<SWEEP_ONLY, IGNORE_SKIP_LIST>(space, p, NULL); |
3560 } | 3560 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3773 while (buffer != NULL) { | 3773 while (buffer != NULL) { |
3774 SlotsBuffer* next_buffer = buffer->next(); | 3774 SlotsBuffer* next_buffer = buffer->next(); |
3775 DeallocateBuffer(buffer); | 3775 DeallocateBuffer(buffer); |
3776 buffer = next_buffer; | 3776 buffer = next_buffer; |
3777 } | 3777 } |
3778 *buffer_address = NULL; | 3778 *buffer_address = NULL; |
3779 } | 3779 } |
3780 | 3780 |
3781 | 3781 |
3782 } } // namespace v8::internal | 3782 } } // namespace v8::internal |
OLD | NEW |