| OLD | NEW |
| 1 # Blink GC Design | 1 # Blink GC Design |
| 2 | 2 |
| 3 Oilpan is a garbage collection system for Blink objects. | 3 Oilpan is a garbage collection system for Blink objects. |
| 4 This document explains the design of the GC. | 4 This document explains the design of the GC. |
| 5 If you're just interested in how to use Oilpan, | 5 If you're just interested in how to use Oilpan, |
| 6 see (BlinkGCAPIReference)[BlinkGCAPIReference.md]. | 6 see (BlinkGCAPIReference)[BlinkGCAPIReference.md]. |
| 7 | 7 |
| 8 [TOC] | 8 [TOC] |
| 9 | 9 |
| 10 ## Overview | 10 ## Overview |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 are marked as dead and the next GC starts. The objects marked as dead are | 185 are marked as dead and the next GC starts. The objects marked as dead are |
| 186 swept in the sweeping phase of the next GC. This means that you cannot assume | 186 swept in the sweeping phase of the next GC. This means that you cannot assume |
| 187 that some two objects get destructed in the same GC cycle. | 187 that some two objects get destructed in the same GC cycle. |
| 188 | 188 |
| 189 ## Heap structures | 189 ## Heap structures |
| 190 | 190 |
| 191 Each thread has its dedicated heap so that the thread can allocate an object | 191 Each thread has its dedicated heap so that the thread can allocate an object |
| 192 without acquiring a lock. For example, an object allocated on thread 1 goes | 192 without acquiring a lock. For example, an object allocated on thread 1 goes |
| 193 to a different heap than an object allocated on thread 2. | 193 to a different heap than an object allocated on thread 2. |
| 194 | 194 |
| 195 In addition, each thread provides multiple heaps to group objects by their type | 195 In addition, each thread provides multiple arenas to group objects by their type |
| 196 and thus improves locality. | 196 and thus improves locality. |
| 197 For example, a Node object allocated on thread 1 goes to a different heap than | 197 For example, a Node object allocated on thread 1 goes to a different heap than |
| 198 a CSSValue object allocated on thread 1. (See BlinkGC.h to get the list of | 198 a CSSValue object allocated on thread 1. (See BlinkGC.h to get the list of |
| 199 the typed heaps.) | 199 the typed arenas.) |
| 200 | 200 |
| OLD | NEW |