Rename /debug/gc-flush to /debug/gc/flush. Turns out pprof has this available, also, via /debug/pprof/heap?gc=1. Oh well.
Add 'PUT /debug/gc/free'. This route calls (runtime/)debug.FreeOSMemory(), which runs the GC and then tries to return as much memory to the OS as possible.
Rename /debug/gc-flush to /debug/gc/flush. Turns out pprof has this available, also, via /debug/pprof/heap?gc=1. Oh well.
Add 'PUT /debug/gc/free'. This route calls (runtime/)debug.FreeOSMemory(), which runs the GC and then tries to return as much memory to the OS as possible.