comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: GC - again, :-)
Date: 1997/05/02
Date: 1997-05-02T00:00:00+00:00	[thread overview]
Message-ID: <01bc5742$bf3c7640$d5fd82c1@xhv46.dial.pipex.com> (raw)
In-Reply-To: Pine.SGI.3.95.970430110433.18224A-100000@shellx.best.com





Brian Rogoff <bpr@best.com> wrote in article
<Pine.SGI.3.95.970430110433.18224A-100000@shellx.best.com>...
> [...] 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.





  parent reply	other threads:[~1997-05-02  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-29  0:00 GC - again, :-) Jon S Anthony
1997-04-30  0:00 ` Brian Rogoff
1997-05-01  0:00   ` Jon S Anthony
1997-05-02  0:00   ` Nick Roberts [this message]
1997-05-03  0:00     ` Jon S Anthony
1997-05-04  0:00     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox