FYI, after asking on Slack I got some useful pointers: - https://golang.org/pkg/runtime/#MemStats - definitions of memory stats from the golang runtime - https://github.com/prometheus/client_golang/blob/master/prometheus/go_collector.go - the code that publishes golang runtime memory stats as Prometheus metrics. - https://man7.org/linux/man-pages/man2/madvise.2.html - has some clues about memory blocks in special in-between states. This explains why the above stuff talks about some of the memory that a golang process has as being "released to the OS". - https://github.com/golang/go/issues/32284 - has an interesting discussion. I looked around more than a little, and could not find it collected in a wiki page or blog entry or article. - https://godoc.org/golang.org/x/debug/cmd/viewcore - tool for crawling coredumps, mentioned in issue 32284. - https://golang.org/pkg/runtime/#hdr-Environment_Variables - things you can set in GODEBUG.
So I tried viewing the memory usage of a program from four angles. I got some consistency, and some inconsistencies. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fcd175d6-f6eb-4d3f-a4a2-510f577ad18eo%40googlegroups.com.