I have a piece of software that has to analyze big files. Constraining the input or giving infinite memory is not an option, so I have to live with flying OOMEs. Because the OOME only kills the Thread, my software runs in some crappy state.
From outside everything looks okay because the process is running but on the inside it's braindead.
I would like to pull the plug on it. But how can I do this?
Catching a OOME does not guranteee that the next line of code will be executed. e.g System.exit(9). So the JVM has to notice OOME and destory itself.
Is their some vm option for this?