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: 109fba,8e3b3db66f3b0061 X-Google-Attributes: gid109fba,public X-Google-Thread: f4fd2,8e3b3db66f3b0061 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 1014db,8e3b3db66f3b0061 X-Google-Attributes: gid1014db,public X-Google-Thread: fd443,8e3b3db66f3b0061 X-Google-Attributes: gidfd443,public X-Google-Thread: 103376,474d28ddf953b3c1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-12 20:16:43 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!news1.digex.net!ois.com!ois.com!not-for-mail From: beckwb@ois.com (R. William Beckwith) 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) Followup-To: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp,comp.lang.ada Date: 12 Dec 1994 07:46:08 -0500 Organization: Objective Interface Systems, Inc. Message-ID: <3chgmg$6p5@gamma.ois.com> References: NNTP-Posting-Host: gamma.ois.com X-Newsreader: TIN [version 1.2 PL2] Xref: nntp.gmd.de comp.lang.c:71855 comp.lang.c++:82468 comp.lang.lisp:9550 comp.lang.ada:17451 Date: 1994-12-12T07:46:08-05:00 List-Id: Henry G. Baker (hbaker@netcom.com) wrote: : Another common example is a function that returns an object of : arbitrary size. You don't know how much space to allocate for it : on the stack, and if you simply redefine the stack frame to include : the object (which was stack-allocated by the called function), then : you may waste huge amounts of space on the stack. So you're better : off allocating it in a heap, but remembering that you have only : one pointer to it. I thought most Ada compilers returned unconstrained objects on a secondary stack. True? I guess the secondary stack might be heap based, but this would preclude limitless size unlike the primary stack. Hmmm. ... Bill