diff options
| author | 2025-04-01 15:24:11 +0000 | |
|---|---|---|
| committer | 2025-04-01 16:24:11 +0100 | |
| commit | fdf23a91de791b813f65c244fd75e3262171f1b0 (patch) | |
| tree | 6ad5045e17f4520386067e4334e749be09ae1510 /vendor/modernc.org/libc/mem_expvar.go | |
| parent | add a security.md stub, until (if) we determine a fancier security process :w... (diff) | |
| download | gotosocial-fdf23a91de791b813f65c244fd75e3262171f1b0.tar.xz | |
update modernc.org/sqlite to v1.37.0-concurrrency-workaround (#3958)
Diffstat (limited to 'vendor/modernc.org/libc/mem_expvar.go')
| -rw-r--r-- | vendor/modernc.org/libc/mem_expvar.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/modernc.org/libc/mem_expvar.go b/vendor/modernc.org/libc/mem_expvar.go new file mode 100644 index 000000000..e2c5aae7a --- /dev/null +++ b/vendor/modernc.org/libc/mem_expvar.go @@ -0,0 +1,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() + })) +} |
