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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fdc38a13551814d X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Allocators and memory reclamation Date: Tue, 29 Jan 2008 03:12:48 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <4a2fe64e-ae34-4093-88ec-1dc612a9adbd@v29g2000hsf.googlegroups.com> NNTP-Posting-Host: 137.138.37.241 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1201605168 32315 127.0.0.1 (29 Jan 2008 11:12:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 29 Jan 2008 11:12:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=137.138.37.241; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20071127 Red Hat/1.5.0.12-0.8.el4 Firefox/1.5.0.12 pango-text,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19649 Date: 2008-01-29T03:12:48-08:00 List-Id: On 29 Sty, 01:41, Robert A Duff wrote: > Finalization of heap objects happens when you do > Unchecked_Deallocation. In addition, when an access type goes > out of scope, all remaining objects (the ones you did not > Unchecked_Deallocate) are finalized in an arbitrary order, > but this does not free the memory. [...] > In implementation terms, each finalizable heap object is > chained onto a doubly-linked list. U_D removes the object > from the list, finalizes it, and frees the memory. > When the access type goes out of scope, the implementation > walks down the list and finalizes everything on it. [...] This, and the replies from Adam and Dmitry give me the complete picture of how it works. Thanks for the explanation. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com