Settings

Theme

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

blog.twitch.tv

1 points by timeoperator 2 years ago · 1 comment

Reader

alpaca128 2 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection