[mercury-users] garbage collection

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 30 13:29:35 AEDT 2000


On 25-Oct-2000, Michael Day <mcda at students.cs.mu.oz.au> wrote:
> 
> > As yet there is no Mercury interface to these C functions and variables;
> > you need to use Mercury's C interface to access them.  (Providing a
> > Mercury module with a Mercury interface to the all these facilities
> > would make a nice task for some enthusiastic volunteer ;-)
> 
> Presumably this interface wouldn't be very stable, given the upcoming
> support for the .NET vm and its garbage collector (and the still
> nonexistent native garbage collector?).

Stability is not the same as portability.  The interface would be
quite stable, since the Boehm gc's interface for that stuff hasn't
changed very much over recent years; you just couldn't portably count
the procedures in this interface having any effect.

E.g. they could be define like so:

	:- pragma c_code(boehm_gc__enable_incremental, "
		#ifdef CONSERVATIVE_GC
		  /* we're using the Boehm et al conservative collector */
		  GC_enable_incremental();
		#else
		  /* we're not using the Boehm et al conservative collector */
		  /* so do nothing */
		#endif
	"),

> Are equivalents to the boehm
> functions present with other garbage collectors?

Most garbage collectors and memory allocators provide some functionality
for tuning the behaviour of the collector/allocator, but the details vary.
In general, the need for tuning, the type of tuning required, and the
effectiveness of such tuning are going to be inherently system-dependent.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list