strelaysrv using more than 4 GB of RAM

I’ve experienced a problem with strelaysrv using basically half of the available 8 GB of RAM, leading the the OS running out of memory and becoming barely responsive. Is there any way that I can debug this and try to find the culprit? There’re various ways to debug Syncthing proper (see https://docs.syncthing.net/dev/debugging.html), but what about strelaysrv? Can STPROFILER be used with it too?

For the record, this is a self-compiled strelaysrv.exe (amd64) binary running under Windows 10 x64.

See strelaysrv -help:

  -pprof
    	Enable the built in profiling on the status server

The status server listens on :22070 so you’d be able to go tool pprof http://localhost:22070/debug/pprof/heap for example.