From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3498dd887729ed19 X-Google-Attributes: gid103376,public From: Hans-Juergen Boehm Subject: Re: Garbage Collection in Ada Date: 1996/10/18 Message-ID: <3267F150.41C6@mti.sgi.com>#1/1 X-Deja-AN: 190393798 references: <01bbb910$f1e73f60$829d6482@joy.ericsson.se><199610132138291604607@dialup101-6-14.swipnet.se><1996Oct13.194807.1@eisner> cc: boehm content-type: text/plain; charset=us-ascii organization: Silicon Graphics Inc., Mountain View, CA mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0S (X11; I; IRIX 6.2 IP22) Date: 1996-10-18T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Are there really programs that count on conservative GC working? Well > perhaps so. For example, Microsoft Word, at least the version I use, > sometimes leaks memory, and just possibly this is a data dependent > effect if it uses conservative GC, since it could be that if certain > words are in your document, you are unlucky and some storage does > not get freed. > I'm quite sure that Microsoft Word does NOT use a conservative GC. If it did, you might not have this problem. There are a number of systems that do count on conservative GC to various extents, e.g. the Xerox PARC Cedar programming environment, some Xerox printers, every Modula-3 program, every Sather program, etc. I believe the standard Sun Java run-time also uses a partially conservative GC (see the recent discussion in comp.lang.java.tech). In general, my experience has been that such applications are much more reliable than manually memory managed code, for the obvious reasons: reasons: 1. No memory leaks of the traditional kind. 2. Users are less afraid to use robust data structures that require dynamic memory allocation and shared substructures. During my last several years at Xerox, I don't believe that I had to ever restart my Cedar environment due to conservative GC leakage, and it routinely stayed up for weeks. I know of only a few anecdotes in which significant leaks were observed with a conservative collector. These were all repeatable and easily fixed by supplying a small amount of type information in one or two places. (I believe that in all cases in which the program was written for GC, even the leaky program actually remained usable. The really bad cases occurred with custom allocation hacks designed to get around a slow noncollecting allocator, which was then replaced by a collector.) -- Standrard disclaimer ... Hans-Juergen Boehm boehm@mti.sgi.com