Hacker News new | ask | show | jobs
by nlitened 15 days ago
Just set it to a very large number if you want that behavior. If I remember correctly, JVM may use some sweet optimizations like use 32-bit pointers if you limit your max memory below 32 GB. It wouldn’t be able to do that if it does not know what the theoretical maximum for your app will be.
1 comments

It doesn't work well. The VM will happily use all that space, and only reluctantly give it back.