4 ms·
It’s (mostly) not about performance, it’s about minimizing failure. Static memory allocation makes you OOM-proof.
by nwjsmith 1mo ago
It’s (mostly) not about performance, it’s about minimizing failure. Static memory allocation makes you OOM-proof.
- skavi 1mo agoseems not as great for consumer software in uncontrolled environments. static allocation means the application hordes memory that the OS should probably be able to provide to other processes. constant work probably leads to higher average power usage.
- sarchertech 1mo agoIn practice, writing programs this way tends to result in programs that use less memory not more.
- vinyl7 1mo agoThe OS writes unused memory pages to the swap file, so this is a non-issue. I can go allocate a TB of RAM on my 32gb system and windows will happily give it to me.
- renox 1mo ago> the OS _writes_ unused memory pages to the swap file The OS write unused memory pages to the swap file by default. But the 'constant memory' design is usually done with locking in memory both the executable and memory pages (also pinning the process to CPUs, using realtime priorities etc).
- Chaosvex 29d agoWindows doesn't support overcommit, so you can't unless you have a ridiculously huge swap set. It is an issue.
- irq-1 1mo ago> Static memory allocation makes you OOM-proof. It ensures you don't cause an OOM error. Your app can still be killed by OOM.
- deleted 1mo ago[deleted]