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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a29f6c543c430f19 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: GC - again, :-) Date: 1997/05/02 Message-ID: <01bc5742$bf3c7640$d5fd82c1@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 238975733 References: Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Newsgroups: comp.lang.ada Date: 1997-05-02T00:00:00+00:00 List-Id: Brian Rogoff wrote in article ... > [...] since I've been writing an > interpreter for a Lisp-like language in Ada. Obviously I can write a > GC for a set of objects as part of the interpreter proper, since I > know the lifetimes of many objects, and all of the roots, but I'd > prefer to be able to say something like > > type SExpr_ID is access all SExpr_Type'Class; > for SExpr_ID'Storage_Pool use Garbage_Collected_Pool; > ... > -- These are ugly, but might be useful > Register_Root ( Garbage_Collected_Pool, Root_1 ); > ... > Register_Root ( Garbage_Collected_Pool, Root_n ); > > and thus be able to reuse the collector easily in other contexts. It seems to me that a representation clause would be the much the best way to specify what sort of storage reclamation strategy is applied to a storage pool. I would (quite strongly) suggest that full reclamation ought to be the default, with agreed-upon clauses for selecting other strategies. There would surely be an option No_Reclamation to switch garbage collection off completely, for those occasions when it was required. I would greatly appreciate opinions on this. Nick.