跳转到内容

Memory Leaking

此内容尚不支持你的语言。

Memory Leaking Scenarios go pprof与线上事故:一次成功的定位与失败的复现

Gin pprof

import "github.com/gin-contrib/pprof"
pprof.Register(router)

Case Sets

Case1: https://github.com/golang/go/issues/25484

yes, the way used by strings.Builder, is a more efficient way.

func ByteSlice2String(bs []byte) string {
return *(*string)(unsafe.Pointer(&bs))
}

For reference, this is the source referred to

https://www.openmymind.net/Go-Slices-And-The-Case-Of-The-Missing-Memory/