home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!decwrl!deccrl!news.crl.dec.com!rdg.dec.com!jch
- From: jch@rdg.dec.com (John Haxby)
- Subject: Re: Is GC needed?
- Message-ID: <1992Jul21.145534.1967@rdg.dec.com>
- Keywords: robust
- Sender: news@rdg.dec.com (Mr News)
- Organization: Digital Equipment Corporation
- References: <1992Jul8.012152.28375@clam.ssw.de> <1992Jul10.165626.7864@visix.com> <1992Jul13.133931.27924@bony1.bony.com> <5677@osc.COM>
- Date: Tue, 21 Jul 1992 14:55:34 GMT
- Lines: 36
-
- In article <5677@osc.COM>, jgk@osc.COM (Joe Keane) writes:
- |> In article <1992Jul13.133931.27924@bony1.bony.com> richieb@bony1.bony.com
- |> (Richard Bielak) writes:
- |> >Actually a problem much worse than memory leaks, is the problem of multiple
- |> >deallocations. Multiple deallocation of the same chunk of memory is usually
- |> >fatal...
-
- [Comments about much improved allocators deleted]
-
- GC is also needed to remove inter-module dependencies.
- For examlpe, there was a bug in BSD4.2 with certain ethernet drivers
- that showed up as a memory leak. Basically, the IP code passed buffer
- to the driver and forgot about it. However, the driver did not free the
- buffer since it couldn't tell whether or not the IP layer had done with it.
-
- There are two equally inglamous ways of fixing this: one is to provide
- reference counts in buffer headers, the second is for the IP layer to give
- a copy of the buffer to the driver. Both have been tried, both work. The
- second is slow and wasteful, the first requires a substantial re-write of the
- kernel's memory management: essentially to introduce a reference counting
- collector. I hope the cyclic references are dealt with....
-
- Garbage collectors can be made arbitrarily fast given enough memory,
- though that is a poor excuse. However, reasonable garbage collectors in
- sensible amounts of memory can give significant performance improvement.
- Even stop-and-wait collectors can cut the down time to half a second and
- still keep good performance. Incremental collectors don't even have this
- problem.
-
- --
- John Haxby, Definitively Wrong.
- Digital <jch@rdg.dec.com>
- Reading, England <...!ukc!wessex!jch>
-
- ----------------------------------------------------------------
- The opinions expressed herein are my own, not my employers.
-