mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
internal/debug: add debug_freeOSMemory (#15122)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user