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,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-16 14:03:56 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!diablo.netcom.net.uk!netcom.net.uk!dispose.news.demon.net!demon!grolier!club-internet!not-for-mail From: Laurent Guerby Newsgroups: comp.lang.ada Subject: Re: Better support for garbage collection Date: 16 Mar 2001 20:46:14 +0100 Organization: Club-Internet (France) Message-ID: <86bsr15wft.fsf@acm.org> References: <98m938$2iod0$1@ID-25716.news.dfncis.de> <861ys03t2f.fsf@acm.org> NNTP-Posting-Host: nas20-241.vlt.club-internet.fr X-Trace: front4m.grolier.fr 984771658 1642 195.36.170.241 (16 Mar 2001 19:40:58 GMT) NNTP-Posting-Date: 16 Mar 2001 19:40:58 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Xref: supernews.google.com comp.lang.ada:5773 Date: 2001-03-16T19:40:58+00:00 List-Id: Robert A Duff writes: > Laurent Guerby writes: > > What I would like to see in Ada is to have an allocator where you pass > > the pool object at allocation and deallocation. One pool per type is > > not very flexible. > I agree. I'm currently working on a tool that analyzes programs, and I > store the symbol table for each source file in a separate storage pool, > so I can deallocate them conveniently and efficiently as things become > obsolete and whatnot. It's a pain in the neck to implement that in Ada, > and it's impossible to make it task safe (but I don't happen to need > tasks in that part of my tool). I'm even surprised it's possible to implement at all. How do you manage to get one pool per file in Ada (I assume a dynamic number of file)? > > Why did Ada 95 include pool objects only on a per type basis? > I don't know. Perhaps Tucker can tell us. > > What syntax would you suggest? The obvious new T'(Pool_Object, Value) doesn't work unfortunately, so may be: new T'(Value) at Pool_Object -- may be replace "at" by use/of/with/in??? You also need a new version of Unchecked_Deallocation with an additional parameter, but no new syntax needed here (and with overloading, no new name). I see no way to include the allocation part of this feature without new syntax, due to the way 4.8 is written: 4.7: qualified_expression ::= subtype_mark'(expression) | subtype_mark'aggregate If other people have ideas. -- Laurent Guerby