Linux下GO语言编译出来的程序VSZ占用很大

XiaoYanShen · · 1739 次点击
这个只是说出的原因,没有本质解决问题呐.现在程序运行和PC运行不一样
#4
更多评论
是不是创建的对象太多了
#1
http://docs.studygolang.com/doc/faq#Why_does_my_Go_process_use_so_much_virtual_memory The Go memory allocator reserves a large region of virtual memory as an arena for allocations. This virtual memory is local to the specific Go process; the reservation does not deprive other processes of memory. To find the amount of actual memory allocated to a Go process, use the Unix top command and consult the RES (Linux) or RSIZE (macOS) columns.
#2