home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: Garbage Collection for C++
- Message-ID: <9223122.20958@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Aug6.014619.2111@ucc.su.OZ.AU> <DAVEG.92Aug13025629@synaptx.synaptics.com> <TMB.92Aug16164940@arolla.idiap.ch> <1992Aug18.021453.24394@news.mentorg.com> <TMB.92Aug18123919@arolla.idiap.ch>
- Date: Tue, 18 Aug 1992 12:05:19 GMT
- Lines: 27
-
- tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
-
- >Conservative GC with a "free" function is a safety net. If you don't
- >run out of storage, you don't know it's even there. If you do run out
- >of storage, it lets your program continue to run when it would
- >otherwise have crashed. Whether you want to rely on this feature is up
- >to you, but, in general, I can see no harm in having it in the
- >language...
-
- This presumes that you will only perform garbage collection when there
- is *no* more storage available.
-
- In fact that strategy amounts to the "bad old days" of GC, where programs
- that used GC were resource hogs, ran slowly, and/or paused for lengthy
- periods displaying the dreaded message "Garbage collecting... please wait".
- It simply does not work with virtual memory.
-
- It is therefore essential that a GC version of malloc() sometimes perform
- garbage collection even though there is still (virtual) memory available.
- The question is, how can we do this in a way that does not impact poorly
- on the performance of programs that do mostly manual allocation?
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature VIRUS is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-