golang-获取当前的内存状态

Yishto 2021-08-20 21:46:27
Categories: Tags:
1
2
3
4
var m runtime.MemStats
runtime.ReadMemStats(&m)
fmt.Printf("%d Kb\n",m.Alloc/1024)