OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 // Mark-sweep old-space. | 4 // Mark-sweep old-space. |
5 // * Uses worst-fit free-list allocation to get big chunks for fast bump | 5 // * Uses worst-fit free-list allocation to get big chunks for fast bump |
6 // allocation. | 6 // allocation. |
7 // * Non-moving for now. | 7 // * Non-moving for now. |
8 // * Has on-heap chained data structure keeping track of | 8 // * Has on-heap chained data structure keeping track of |
9 // promoted-and-not-yet-scanned areas. This is called PromotedTrack. | 9 // promoted-and-not-yet-scanned areas. This is called PromotedTrack. |
10 // * No remembered set yet. When scavenging we have to scan all of old space. | 10 // * No remembered set yet. When scavenging we have to scan all of old space. |
11 // We skip PromotedTrack areas because we know we will get to them later and | 11 // We skip PromotedTrack areas because we know we will get to them later and |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 226 |
227 void SemiSpace::StartScavenge() { | 227 void SemiSpace::StartScavenge() { |
228 Flush(); | 228 Flush(); |
229 | 229 |
230 for (Chunk* chunk = first(); chunk != NULL; chunk = chunk->next()) { | 230 for (Chunk* chunk = first(); chunk != NULL; chunk = chunk->next()) { |
231 chunk->set_scavenge_pointer(chunk->base()); | 231 chunk->set_scavenge_pointer(chunk->base()); |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
235 } // namespace fletch | 235 } // namespace fletch |
OLD | NEW |