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,8fd45d32d7c94df3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r29g2000yqj.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: User Defined Storage Pool : did you ever experiment with it ? Date: Mon, 24 Jan 2011 01:25:29 -0800 (PST) Organization: http://groups.google.com Message-ID: <28c691ce-92e1-43b4-abba-96c63f10d235@r29g2000yqj.googlegroups.com> References: NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1295861129 12502 127.0.0.1 (24 Jan 2011 09:25:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 24 Jan 2011 09:25:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r29g2000yqj.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:17625 Date: 2011-01-24T01:25:29-08:00 List-Id: Yannick Duch=EAne wrote on comp.lang.ada: > I don't feel to remember I ever see a single Ada source with some use of = =A0 > [storage pools]. Is this just an not enough known feature, or does it mea= n there is =A0 > not so much benefit to use it ? At Eurocontrol, we use two custom storage pools besides the default one. We have a "No-Dealloc" storage pool that raises an exception if the software attempts to deallocate from it. More importantly, this pool works in two modes: initially it accepts allocation and writing of new objects in the pool (but, of course, no deallocation), then it switches to read-only mode by calling mprotect(2) on all memory pages. Any subsequent attempt to alter data in this pool will crash the program. We use this pool to parse a large database of immutable objects into memory; objects have lots of access values referencing one another, so we have to be able to alter references while parsing. We switch to read-only mode when the parsing is complete. The other custom storage pool we use is to detect memory leaks. We do that by preprocessing our sources when building in a special leak- detection mode. -- Ludovic Brenta.