High virtual memory allocation by golang

I have a large golang project (based on docker source code) that runs on Raspberry Pi and the virtual memory that the go process request is huge:

  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
  728     1 root     S     932m 401%   8% /usr/bin/mygoap

There is still free physical memory which I can verify using free -m, why go vmalloc so much memory?

https://golang.org/doc/faq#Why_does_my_Go_process_use_so_much_virtual_memory

1 Like

Where does this allocation happens in the golang project? https://github.com/golang/go

I think it is here (I haven’t hacked on the runtime yet):

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.