It’s (mostly) not about performance, it’s about minimizing failure. Static memory allocation makes you OOM-proof.
It ensures you don't cause an OOM error. Your app can still be killed by OOM.
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).