Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: programs compiled by 1.11 allocate an unreasonable amount of virtual memory #28114
What version of Go are you using (
changed the title from
Programs compiled by 1.11 allocate an unreasonable amount of virtual memory
runtime: programs compiled by 1.11 allocate an unreasonable amount of virtual memory
Oct 10, 2018
Interesting. I had thought that
The solution I proposed in #28081 should also fix this.
Thanks for the hint @aclements.
Indeed, couple of my system programs are using
As observed by host OS, it appears to have indeed copied all of the allocated virtual memory into main memory:
Hehe also I was wondering why this issue attracted so many emojis, it turns out someone put it on hackernews..
@HouzuoGuo, yes, that's what I would expect. Thanks for confirming.
I don't really understand when it makes sense to use
Even if we do modify arena mapping to be incremental (which I believe should be relatively easy to do), I don't want to change how the arena index is mapped because that would impact both performance and simplicity. So
Thanks @aclements , TIL about MCL_ONFAULT, apparently available since Linux 4.4. I shall use it from now and onward.
Beyond the scope of this issue report, would you please offer some hints on the proper invocation of mlock in protecting a sensitive instance of structure, especially to determine its memory address range? Take this structure for example