Limit Java Memory Globally
Java can be greedy with RAM. By default, it grabs up to half your system memory, which is fine for servers—but annoying on a dev machine.
You can tame this by setting:
|
|
I dropped this into my .bashrc, and it instantly reduced background memory pressure. One gig is plenty for most compile-and-run tasks during development.