Newsgroups: comp.lang.dylan,comp.lang.functional,comp.lang.misc,comp.lang.scheme,comp.object,comp.lang.java
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!ix.netcom.com!netcom.com!NewsWatcher!user
From: hbaker@netcom.com (Henry Baker)
Subject: Re: (debunk-myth '(debunk-myth '(<-efficient gc malloc/free)))
Message-ID: <hbaker-2810950814340001@10.0.2.15>
Sender: hbaker@netcom16.netcom.com
Organization: nil organization
References: <46dm26$if4@jive.cs.utexas.edu> <QOBI.95Oct22133648@qobi.ai> <1995Oct24.110637.4090@news.cs.indiana.edu> <46rc5u$h1u@shemesh.tis.com>
Date: Sat, 28 Oct 1995 16:14:34 GMT
Lines: 31
Xref: glinda.oz.cs.cmu.edu comp.lang.dylan:5684 comp.lang.functional:6604 comp.lang.misc:23565 comp.lang.scheme:14165 comp.object:39985 comp.lang.java:3060

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

> At what point does a GC system start Garbage collecting? with Virtual memory
> is this only when you run out of swap space? If the application never
> fills the VM space then all its memory is returned when it exits so there is
> never a need to Garbage Collect as such. Do you just GC every N alloc calls?
> 
> On limited memory systems I can see how GC works but with VM systems it is
> not so obvious.

This is a good question, which hasn't been completely answered.  If the VM
is well-designed, then the abilities of the GC to compact the live data aren't
terribly important.  I.e., if the VM could individually handle pages of
approximately the size of an object, then the VM would already be doing most
of the work to make sure that only live objects are actually tying up real
memory.  In this case, except for running out of swap space and address space,
running a GC is basically counterproductive, because it starts competing
with the running program for real memory.

However, the ideal storage transaction for a disk has been getting larger over
time, so there is presumably some benefit in making sure that the percentage
of live data in these storage transactions is as large as possible.  The
current hypothesis is that generational GC's can do a pretty good job in
eliminating non-live data from your working set, at least if the size of
the most recent generation fits comfortably within the real memory.

This question is still the subject of ongoing research.

-- 
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html
