| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 target->Iterate(&scavenge_visitor); | 786 target->Iterate(&scavenge_visitor); |
| 787 UpdateRSet(target); | 787 UpdateRSet(target); |
| 788 } | 788 } |
| 789 | 789 |
| 790 // Take another spin if there are now unswept objects in new space | 790 // Take another spin if there are now unswept objects in new space |
| 791 // (there are currently no more unswept promoted objects). | 791 // (there are currently no more unswept promoted objects). |
| 792 } while (new_space_front < new_space_.top()); | 792 } while (new_space_front < new_space_.top()); |
| 793 | 793 |
| 794 // Set age mark. | 794 // Set age mark. |
| 795 new_space_.set_age_mark(new_space_.top()); | 795 new_space_.set_age_mark(new_space_.top()); |
| 796 new_space_.ResetFromSpace(); |
| 796 | 797 |
| 797 // Update how much has survived scavenge. | 798 // Update how much has survived scavenge. |
| 798 survived_since_last_expansion_ += | 799 survived_since_last_expansion_ += |
| 799 (PromotedSpaceSize() - survived_watermark) + new_space_.Size(); | 800 (PromotedSpaceSize() - survived_watermark) + new_space_.Size(); |
| 800 | 801 |
| 801 LOG(ResourceEvent("scavenge", "end")); | 802 LOG(ResourceEvent("scavenge", "end")); |
| 802 | 803 |
| 803 gc_state_ = NOT_IN_GC; | 804 gc_state_ = NOT_IN_GC; |
| 804 } | 805 } |
| 805 | 806 |
| (...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4048 for (int i = 0; i < kNumberOfCaches; i++) { | 4049 for (int i = 0; i < kNumberOfCaches; i++) { |
| 4049 if (caches_[i] != NULL) { | 4050 if (caches_[i] != NULL) { |
| 4050 delete caches_[i]; | 4051 delete caches_[i]; |
| 4051 caches_[i] = NULL; | 4052 caches_[i] = NULL; |
| 4052 } | 4053 } |
| 4053 } | 4054 } |
| 4054 } | 4055 } |
| 4055 | 4056 |
| 4056 | 4057 |
| 4057 } } // namespace v8::internal | 4058 } } // namespace v8::internal |
| OLD | NEW |