Go string底层实现? 答案: Go string底层实现? 题目来源:字节跳动 答案: 源码包 src/runTime/string.go.stringStruct 定义了string的数据结构: Type stringStruct struct { str unsafe . Pointer len ...
1. GODEBUG=’gctrace=1’ 2. go tool trace 3. debug.ReadGCStats 4. runtime.ReadMemStats 6.Go 如何查看GC信息? 1. GODEBUG=’gctrace=1’ package main func main () { for n :...