上卷 程序设计
中卷 标准库
- bufio 1.18
- bytes 1.18
- io 1.18
- container 1.18
- encoding 1.18
- crypto 1.18
- hash 1.18
- index 1.18
- sort 1.18
- context 1.18
- database 1.18
- connection
- query
- queryrow
- exec
- prepare
- transaction
- scan & null
- context
- tcp
- udp
- http
- server
- handler
- client
- h2、tls
- url
- rpc
- exec
- signal
- embed 1.18
- plugin 1.18
- reflect 1.18
- runtime 1.18
- KeepAlived
- ReadMemStats
- SetFinalizer
- Stack
- sync 1.18
- atomic
- mutex
- rwmutex
- waitgroup
- cond
- once
- map
- pool
- copycheck
- nocopy
- unsafe 1.18
- fmt 1.18
- log 1.18
- math 1.18
- time 1.18
- timer
下卷 运行时
源码剖析
附录
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
3.4 标记
+--------------------------+ | gcStart | +--------------------------+ | === stop-the-world === | +--- dedicatedMarkWorkersNeeded = ? +--------------------------+ | | startCycle -|----+ +--------------------------+ | | Phase: _GCmark | +--- fractionalUtilizationGoal = ? +--------------------------+ | gcMarkRootPrepare | +--------------------------+ | gcBlackenEnabled = 1 | +--------------------------+ | === start-the-world === | +--------------------------+ | allp | v +----------+----------------------+------------------------+ | schedule | findRunnableGCWorker | findrunnable (nothing) | +----------+----------------------+------------------------+ | | dedicated, fractional idle | | +------------+-----------+ | v +--- p.gcw +----------------------+ | | gcMarkWorkAvailable -|----+--- work.full +----------------------+ | | +--- work.markrootJobs v +----------------+ | gcBgMarkWorker | (worker groutine) +----------------+ +----------------+ | gcDrain | | mutator | +----------------+ +----------------+ | gcMarkDone | | mallocgc | +----------------+ +----------------+ | | gcAssistAlloc | v +------------+------------+ +----------------+ +----------+ | markroot | scanblock | | gcDrain -|---------> | gcDrain -|-----> +------------+------------+ +----------------+ +----------+ | scanobject | greyobject | | gcMarkDone | | +------------+------------+ +----------------+ v +-------------------------+ | gcMarkDone | +-------------------------+ | === stop-the-world === | +-------------------------+ | gcBlackenEnabled = 0 | +-------------------------+ | gcController.endCycle -|---- nextTriggerRatio +-------------------------+ | gcMarkTermination | +-------------------------+ | v +----------------------------+ | gcMarkTermination | +----------------------------+ | Phase: _GCmarktermination | +----------------------------+ +--------+ | gcMark -|---> | gcMark | +----------------------------+ +--------+ | Phase: _GCoff | +----------------------------+ | gcSweep | +----------------------------+ | === start-the-world === | +----------------------------+
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论