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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f4fd2,8e3b3db66f3b0061 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 109fba,8e3b3db66f3b0061 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,8e3b3db66f3b0061 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,474d28ddf953b3c1 X-Google-Attributes: gid103376,public X-Google-Thread: fd443,8e3b3db66f3b0061 X-Google-Attributes: gidfd443,public X-Google-ArrivalTime: 1994-12-11 19:54:38 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!news.kei.com!ub!csn!csnnews!p5.boulder-2.dialup.csn.net!gmckee From: gmckee@cloudnine.com (Gary McKee) Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp,comp.lang.ada Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection) Date: Sun, 11 Dec 94 23:59:23 GMT Organization: McKee Consulting, (Software Technology Assessment) Message-ID: References: <3bii2g$kn2@news.parc.xerox.com> <3bjfep$9ss@gamma.ois.com> <3bo43b$61v@news.parc.xerox.com> NNTP-Posting-Host: 199.117.100.5 X-Newsreader: VersaTerm Link v1.1.6 Xref: nntp.gmd.de comp.lang.c:71775 comp.lang.c++:82399 comp.lang.lisp:9532 comp.lang.ada:17423 Date: 1994-12-11T23:59:23+00:00 List-Id: In Article , bobduff@dsd.camb.inmet.com (Bob Duff) wrote: >In article , >Henry G. Baker wrote: >>I just wanted to point out again that objects whose reference counts >>are always one, and the programmer/compiler knows this, avoid the >>usual overheads of reference counting. > >But it seems to me that in a language like Ada, if a given object only >has one reference pointing to it, and that fact is known at compile >time, then you would almost always declare that object as a normal >stack-allocated object. So it would not be in the heap in the first >place, so reference counting would never occur. ================================================================ Bob, One counter-example would be the situation with compilers that limit the size of the stack space but not the size of the heap. I have placed large, static arrays with predefined values onto the heap in order to leave the stack space for subprogram usage (especially recursive subprograms). Gary McKee -------------------------------------------------------------------- McKee Consulting (303) 795-7287 P. O. Box 3009 gmckee@cloudnine.com Littleton, CO 80161-3009 --------------------------------------------------------------------