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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,19140af19dfa6e01 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-12 10:20:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc02.POSTED!not-for-mail Message-ID: <3F62004D.6080704@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 0Y plans for garbage collection? References: <1127954.kcBZz6amlf@linux1.krischik.com> <3F60E747.40805@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc02 1063387227 24.34.139.183 (Fri, 12 Sep 2003 17:20:27 GMT) NNTP-Posting-Date: Fri, 12 Sep 2003 17:20:27 GMT Organization: Comcast Online Date: Fri, 12 Sep 2003 17:20:27 GMT Xref: archiver1.google.com comp.lang.ada:42423 Date: 2003-09-12T17:20:27+00:00 List-Id: Dmitry A. Kazakov wrote: > But reference counting could be made much more easy and attractive if > smart pointers have more light-weighted implementation than controlled > types in generic packages. There are too many problems with that... Agreed, which is why you want to use a reference counted storage pool. That way the count is stored with the object, and you only incur the overhead when you create a new counted access value. I've done this to create a pool of fixed sized objects. I keep intending to rewrite it to support variable sized objects, but it is always easier to create a fixed-sized reference-counted object with an access value into the normal heap, and do explicit deallocation of that object when the reference count reaches zero. Anyone want to work with me on a "standard" reference counted storage pool for Ada 200Y? The storage pool will only be a couple of pages of code. The real effort is in documenting it and providing examples of use. Or did you mean that the fact that the storage pool was a controlled type was a problem? I don't see that. Typically a program will create a storage pool once and then just use it. The controlled overhead really only comes into play if the storage pool is located inside a nested procedure. -- Robert I. Eachus "As far as I'm concerned, war always means failure." -- Jacques Chirac, President of France "As far as France is concerned, you're right." -- Rush Limbaugh