1
0
Fork 0
golang-modernc-libc/mem_expvar.go
Daniel Baumann 32b8eb3fd7
Adding upstream version 1.65.7.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-19 21:29:57 +02:00

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