Tuesday, June 5, 2001 07:57 AM
You should look into setting the memory heap stacks sizes. The -mx sets up the maximum size of heap stack and the -ms sets the initial or startup heap stack size. When the available memory for a JVM reaches specific ratios, the heap stack size is incremented. (If it has already reached the maximum, you get a out of memory error.)
I suggest that you monitor the GC process by using the command java -verbose:gc (Which would provide the timings, sizes etc) before starting the tuning process. To avoid the GC thread from running, set the -MX and -MS the same. (But then you should know how much memory you need and how much leak takes place over a long period?!)
There are some JVMs (Like IBM's JVM) which allows you to control the GC process using external parameters.
Tuesday, June 5, 2001 07:43 AM
But if you successfully disable garbage collector and you dynamically create objects... what will happen when you fill up all the memory?
Personally I don't know any way to disable gc (and I don't think it's possible to disable it, sorry).