I am currently running a small java class for scientific calculations on graphs (which internally creates lots of huge collections) from within Eclipse on MacOSX Snow Leopard. I have a Macbook with 2GB of RAM and to successfully run the app without OutOfMemory Error I need to run it from eclipse with -Xmx1200m (I know this is very much).
It takes about 500seconds to do all the computations I need to run and it also uses up all the memory I have given it (I monitored it with macosx progress monitor and it goes to 1,2GB for Real Mem)
After this application is done my MacOSX is almost unusable. Even if I close Eclipse everything becomes sluggish and slow. I also notice that whatever I do afterwards (even after closing Eclipse) that e.g. Finder navigation is very slow. It takes ages to render some folders or to change directories. Sometimes I restart the system to be able to work again efficiently.
I would like to understand what is happening in the background when this happens? I was under the impression, that when a java class / app has finished running, that the Garbage Collector at least at the end will cleanup everything and I would have expected that other programs are free to use this memory again. But it "feels" like a memory leak which affects the whole system, even if the Java app is not running anymore.
I would appreciate any hints or readings in this direction.