Path: news.daimi.aau.dk!news.uni-c.dk!newsfeed.sunet.se!news00.sunet.se!sunic!news.sprintlink.net!news.bluesky.net!solaris.cc.vt.edu!news.mathworks.com!tank.news.pipex.net!pipex!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!lll-winken.llnl.gov!venus.sun.com!news2me.EBay.Sun.COM!handler.Eng.Sun.COM!usenet From: lindholm@eng.sun.com (Tim Lindholm) Newsgroups: comp.lang.dylan,comp.lang.functional,comp.lang.misc,comp.lang.scheme,comp.object,comp.lang.java,comp.lang.beta Subject: Re: (debunk-myth '(debunk-myth '(<-efficien Date: 26 Oct 1995 18:07:49 GMT Organization: Sun Microsystems Inc., Palo Alto, CA Lines: 31 Message-ID: <46oipl$222@handler.Eng.Sun.COM> References: Reply-To: lindholm@eng.sun.com NNTP-Posting-Host: gladys.eng.sun.com Xref: news.daimi.aau.dk comp.lang.dylan:15374 comp.lang.functional:16234 comp.lang.misc:32073 comp.lang.scheme:23496 comp.object:47389 comp.lang.java:840 comp.lang.beta:10540 > Eric Jeschke (jeschke@cs.indiana.edu) wrote: > > : Can you give examples of languages that you consider to have state-of-the- > : art gc? I'm personally interested in hearing details about Java's GC, > : which is apparently incremental, and runs concurrently with other Java > : threads (info from BYTE). Anyone have a pointer to more datailed information > : on this? Java's GC is a pragmatic compromise that works reasonably well, but, it should not be confused with the state of the art. It's a reasonably conventional trace and mark, with conservative tracing of the C stack (which we don't use much) and machine registers. There's an optional compaction phase which may leave some fragmentation due to the conservative scan. All non-C-stack object pointers indirect through small "handles" that don't move, so we can do exact tracing and compaction for the most part. GC is not incremental or generational, but is fast enough to be reasonably nonintrusive for the uses to which we are putting it (say 70ms with Java's default 1Mb heap). On machines that support it we have a low-priority GC thread that runs after the system has been idle for a while. This async GC thread keeps an eye out for threads becoming runnable while it is working, and bails out early if so, wasting work but yielding good responsiveness. There are also a form of weak pointers (Refs), and as a last resort the heap will grow to satisfy an allocation request. -- Tim --- Tim Lindholm Voice: +1 415 473 7259 (Internal: x47259) Sun Microsystems, Inc. Internet: lindholm@eng.sun.com 100 Hamilton Ave. Palo Alto, CA 94301-1616 USA