Newsgroups: comp.lang.dylan,comp.lang.functional,comp.lang.misc,comp.lang.scheme,comp.object,comp.lang.java
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.sprintlink.net!newsfeed.internetmci.com!news.msfc.nasa.gov!elroy.jpl.nasa.gov!lll-winken.llnl.gov!venus.sun.com!wnoc-sfc-news!kogwy!math-keio!mad
From: mad@math.keio.ac.jp (MAEDA Atusi)
Subject: When to Start GC (was Re: (debunk-myth ...))
In-Reply-To: pjc@tis.com's message of 27 Oct 1995 19:33:18 GMT
Message-ID: <MAD.95Oct30113048@tanzanite.math.keio.ac.jp>
Sender: news@math.keio.ac.jp
Nntp-Posting-Host: tanzanite
Reply-To: mad@math.keio.ac.jp
Organization: Faculty of Sci. and Tech., Keio Univ., Yokohama, Japan.
References: <46dm26$if4@jive.cs.utexas.edu> <QOBI.95Oct22133648@qobi.ai>
	<1995Oct24.110637.4090@news.cs.indiana.edu>
	<46rc5u$h1u@shemesh.tis.com>
Date: Mon, 30 Oct 1995 02:30:48 GMT
Lines: 43
Xref: glinda.oz.cs.cmu.edu comp.lang.dylan:5714 comp.lang.functional:6611 comp.lang.misc:23572 comp.lang.scheme:14184 comp.object:40010 comp.lang.java:3148

>>>>> "pjc" == Peter J Churchyard <pjc@tis.com> writes:
In article <46rc5u$h1u@shemesh.tis.com> pjc@tis.com (Peter J Churchyard) writes:


    pjc> At what point does a GC system start Garbage collecting? with Virtual memory
    pjc> is this only when you run out of swap space?

This would be optimal if `Copying GC dogma' held.  But it's
unacceptable under usual TSS environment.

    pjc>  If the application never
    pjc> fills the VM space then all its memory is returned when it exits so there is
    pjc> never a need to Garbage Collect as such. 

Jon L. White pursued similar idea in his paper "Address/Memory Management
For a Gigantic Lisp Environment, or, GC Considered Harmful" in 1980
Lisp Conference (pp.119-127).  He proposed that, with tertiary storage
there would be no need to invoke GC in host machines' lifetime.

    pjc> Do you just GC every N alloc calls?

This scheme is used in Emacs Lisp.  User can control N by setting
variable gc-cons-threshold.

    pjc> On limited memory systems I can see how GC works but with VM systems it is
    pjc> not so obvious.

Popularly used technique is to gradually increase heap size when
garbage collector finds growth of live objects, so that heap
size/total live object size ratio is kept constant.  This guarantees
reasonably modest behavior in TSS environment.

Things may be even more complicated in generational garbage
collectors.  Which is better, to invoke GC on long-lived objects area
(and move survived objects to next generation), or to increase size of
the area for that generation?  Is there any clear criteria to make
such decision?

;;;  Keio University
;;;    Faculty of Science and Technology
;;;      Department of Math
;;;		MAEDA Atusi (In Japan we write our family names first.)
;;;		mad@math.keio.ac.jp
