Skip to content

Commit 095778f

Browse files
committed
update gc
1 parent 1672aca commit 095778f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

gc.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,27 @@
130130
131131
```
132132

133+
```
134+
┌────────┐ ┌───────┐
135+
│ │ │ │
136+
│ ▼ │ ▼
137+
│ ┌───┬───────────────────────────────────┐ │ ┌───┬───────────────────────────────────┐
138+
│ │ 1 │ gcBlackenEnabled -> 0 │ │ │ 1 │ mheap_.sweepdone -> 0 │
139+
│ ├───┼───────────────────────────────────┤ │ ├───┼───────────────────────────────────┤
140+
│ │ 2 │ gcphase -> _GCmarktermination │ │ │ 2 │ mheap_.pagesSwept -> 0 │
141+
│ ├───┼───────────────────────────────────┤ │ ├───┼───────────────────────────────────┤
142+
│ │ 3 │ mp.preemptoff = "gcing" │ │ │ 1 │ sweep.parked -> false │
143+
┌───────────────────┐ │ ├───┼───────────────────────────────────┤ │ ├───┼───────────────────────────────────┤
144+
│ gcMarkTermination │──────┘ │ 4 │ g : running -> waiting │ │ │ 2 │ ready(sweep.g) │
145+
└───────────────────┘ ├───┼───────────────────────────────────┤ │ └───┴───────────────────────────────────┘
146+
│ 5 │ systemstack(gcMark) │ │
147+
├───┼───────────────────────────────────┤ │
148+
│ 5 │ gcphase -> _GCoff │ │
149+
├───┼───────────────────────────────────┤ │
150+
│ 5 │ gcSweep() │─────┘
151+
└───┴───────────────────────────────────┘
152+
```
153+
133154
## 初始化
134155

135156
```go

monodraw/gc_process.monopic

3.03 KB
Binary file not shown.

0 commit comments

Comments
 (0)