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-Thread: 103376,c68551ab190372c8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!echo.uk.clara.net From: Stephen Thomas Subject: Re: Ada memory management? Date: Thu, 07 Oct 2004 15:51:21 +0100 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-Id: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@clara.net (please include full headers) X-Trace: 31404285d84883d040037170a00610808832a0629100fc02c1000498416559f1 NNTP-Posting-Date: Thu, 07 Oct 2004 16:00:01 +0100 Xref: g2news1.google.com comp.lang.ada:4875 Date: 2004-10-07T15:51:21+01:00 List-Id: On Thu, 07 Oct 2004 14:22:14 +0000, Georg Bauhaus wrote: > A whole pool is created on procedure entry? Are you sure? The implementation is free to create a new pool when a new access type comes into being, and can destroy that pool when the type goes out of scope. In the original example, this coincides with procedure entry and exit. As it happens, GNAT (as of 3.15p) does not seem to behave this way, and the original example does indeed leak heavily. The point I'm making, however, is that you cannot necessarily assume that it will leak in all Ada implementations. That said, assuming that many Ada implementors would consider storage pool creation/destruction to be expensive (which I think may be your concern), then I suspect most implementations would not try to create pools dynamically in this fashion. Stephen -- Your name is being called by sacred things That are not addressed nor listened to. Sometimes they blow trumpets.