jvmemorypig
October 11, 2005 8:01 AM
Subscribe
Okay, so I have a java program that's supposed to run in the background all the time. The problem is that the JVM allocates all the memory it can use, and then just sits there taking up a half-gig of ram. Is there any way I can get the thing to GC aggressively and release memory back to the system when it's done?
In this case, I can't simply set a smaller max memory size for the system.
posted by delmoi to computers & internet (16 comments total)
I had a similar problem once, long, long ago (so the vm's of today may be much different), calling System.gc() worked for me. The problem I had at the time was that the jvm by default limited itself to 50 megs or so and I had to manually increase that.
posted by RustyBrooks at 8:30 AM on October 11, 2005