3
0
mirror of https://github.com/ergochat/ergo.git synced 2026-03-22 15:18:05 +01:00
ergo/vendor/modernc.org/libc/mem_expvar.go
2026-03-12 21:32:13 -04:00

13 lines
273 B
Go

//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()
}))
}