Live data from Hacker News

Go memory ballast: How I learnt to stop worrying and love the heap

blog.twitch.tv

1–2 of 2 posts

Re: Go memory ballast: How I learnt to stop worrying and love the heap

#2
tl;dr: Go's GC triggered each time the heap allocation size doubled, so they allocated a 10GB byte array in main() to delay garbage collection until the rest of the program allocates 10GB more. And because that 10GB buffer is never actually accessed it's only a virtual allocation.