Sep 12, 2019

[Go] MemStats in runtime package

Reference:
https://vsdmars.blogspot.com/2019/01/golang-golangs-memory-management-eben.html


https://golang.org/pkg/runtime/#MemStats

// HeapInuse is bytes in in-use spans.
// In-use spans have at least one object in them. These spans 
// can only be used for other objects of roughly the same 
// size. 
// HeapInuse minus HeapAlloc estimates the amount of memory 
// that has been dedicated to particular size classes, but is 
// not currently being used. This is an upper bound on 
// fragmentation, but in general this memory can be reused  
// efficiently.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.