summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/libc/mem_expvar.go
blob: e2c5aae7a0658a6eba46973a6b1a071d48af53c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//go:build libc.memexpvar

package libc

import "expvar"

func init() {
	// make sure to build with -tags=memory.counters to have the actual data accumulated in memory allocator
	expvar.Publish("memory.allocator", expvar.Func(func() interface{} {
		return MemStat()
	}))
}