aboutsummaryrefslogtreecommitdiffstats
path: root/internal/debug/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/debug/api.go')
-rw-r--r--internal/debug/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/debug/api.go b/internal/debug/api.go
index 8b7693f6a..7583878ed 100644
--- a/internal/debug/api.go
+++ b/internal/debug/api.go
@@ -176,6 +176,11 @@ func (*HandlerT) Stacks() string {
return string(buf)
}
+// FreeOSMemory returns unused memory to the OS.
+func (*HandlerT) FreeOSMemory() {
+ debug.FreeOSMemory()
+}
+
func writeProfile(name, file string) error {
p := pprof.Lookup(name)
log.Info("Writing profile records", "count", p.Count(), "type", name, "dump", file)