This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: status of gcj's boehm collector?
Adam Megacz wrote:
>I still think System.gc() has the right connotations, since it is not
>a thread-specific operation. Would you approve of using it if there
>was a way for the appliation to know how much allocation had taken
>place since the last full heap scan?
>
>If not, what would you suggest instead of System.gc()?
>
Ideally, there shouldn't be any reason to ever want to trigger an
explicit collection.
Event driven applications, such as a GUI application or a webserver,
tend to spend much of their time sitting around doing nothing, but they
need to respond as quickly as possible when an event does arrive. So for
this type of application, the worst time to perform a GC is arguably
during a "new", and the best time is while other threads are idle.
If we can get incremental mode working reasonably, it ought to be then
possible to run most of the GC in a separate thread, without "stopping
the world". This way the GC could do its work while other threads are
idle and latency would be very low. If the GC can't keep up with the
mutators then I guess it would still need to stop the world to complete
a collection, but that hopefully wouldn't be common with typical
applications.
regards
Bryce.