The two golang programs I cross-compiled account for 648MB of memory, and one of the programs has only 14MB of memory in the docker under x64. Here is my build environment variable:
The program running environment is:
CPU AR9344 MIPS 74kc
My memory is only 128MB, but the golang program takes up 648MB after it starts up, and it works fine. Why is this? How to solve this bug?
W/o an idea of the code structure, no definite answer can be provided.
I don’t know where your searches lead you but this page about performance of Go might help.https://github.com/golang/go/wiki/Performance
It’s sounds like you’re talking about virtual memory, which Go will look like it’s using a lot of. This is due to the memory allocation system and the garbage collection. But that memory is virtual - it’s not in use, it doesn’t matter.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.