File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes verbose:gc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "verbose:gc" Watch "verbose:gc" New topic


Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Hi everybody,
I'm using the verbose:gc option and I get some thing like this

could you please explain me how to understand those values?(1814K-->1398K(1984K))
At line Full GC 1450K->212K(2112K), 0.0102848 secs does it mean that the GC is called to work??
Thx in advance!

By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Well, it looks like your particular JVM is doing partial cleanups in between full cleanups.
However Sun did not actually write all the JVMs and the JVM specs leave quite a bit of room as to how the gc function can be done. Including what messages are spurted out.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
The line
[GC 1814K->1398K(1984K), 0.0004230 secs]
means GC ran for .0004230 sec and reduced the amound of heap memory used from 1814 KB to 1398 KB. Currently 1984 KB are allocated for the heap, though that's not necessarily the maximum possible. If memory use gets too high and GC can't reduce it enough, the JVM will request more from the OS. As long as the OS has memory available, heap size may increase up to the limit set by the -Xmx option. At least, that's how it works for SDK 1.4 on Windows - may be different for other JVM's.
[ June 27, 2002: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Thx Cindy and Jim for your answers, it helped me a lot!
I agree. Here's the link:
subject: verbose:gc
It's not a secret anymore!