4 ms·
"Until the OS refuses to give you more" Just like every compiled, non-GC program gets. It's annoying af to fiddle with interpreter/VM "maximum heap sizes".
by aianus 10y ago
"Until the OS refuses to give you more"
Just like every compiled, non-GC program gets. It's annoying af to fiddle with interpreter/VM "maximum heap sizes".
- munificent 10y agoAlas, "until the OS refuses to give you more" is also not a meaningful signal anymore. https://en.wikipedia.org/wiki/Memory_overcommitment https://en.wikipedia.org/wiki/Memory_overcommitment
- dikaiosune 10y agoTracing garbage collectors have to have some metric for when to trigger a stop-the-world collection. IIRC, many GCs track heap usage and trigger stop-the-world when it gets above a threshold. GC'd language runtimes which don't have a tracing/compacting collector (e.g. CPython with refcounting) don't need to configure a heap size because the behavior doesn't vary as you use up your heap.
- aianus 10y agoThat's still no good reason to throw all kinds of "Out Of Memory" errors when you're hitting 1GB out of the 16GB of physical memory on my system.
- mike_hearn 10y agoThat's what most GCs do set the default max heap size to, assuming you don't have a swap file.