Understanding those pesky OOM exceptions
February 2, 2008 | In: citations
JVM Lies : The OutOfMemory Myth
It’s also been covered (with even more comments) over on TSS.
It’s certainly beneficial for a developer to have a basic understanding of Java’s approach to memory management. This post (and comments) does provide a simple overview and discusses some of the causes and gotchas for those ever annoying OutOfMemory exceptions.
If there’s one thing to take note of, it’s that not all memory problems can be solved by an increase in the heap allocation. So please don’t do that and just walk away, it’s never a one size fits all problem and will almost certainly come back to bite you.
(If you’re like me, I’m sure you all love a good PermGen-related OOM… uhh… maybe not.)
1 Response to Understanding those pesky OOM exceptions
Glenn
February 11th, 2008 at 1:18 pm
The garbage collector is great to ask questions about in an interview. People normally don’t have a clue how it works or how you can fine tune it but the people that do know that information are awesome if you can get them on your team. When a website is under heavy load knowing when or limiting a full gc clean is vital and the sun jvm gives you lot’s of options to fine tune it. Very interesting stuff. Next time you have to interview a guy ask him to explain all the different memory reference types (Hard, Soft, Weak, Phantom) Phantom is actually really interesting but very few people actually use it.