[mercury-users] GC

Fergus Henderson fjh at cs.mu.oz.au
Wed Sep 17 07:11:59 AEST 1997


Dominique de Waleffe wrote:
> 
> Is there a way to diminish the # of GCs by letting the memory grow to
> a lot more?

Yes.  You can set the `GC_free_space_divisor' variable
(using the C interface) to a smaller value.

>From boehm_gc/gc.h:

	/* We try to make sure that we allocate at 	*/
	/* least N/GC_free_space_divisor bytes between	*/
	/* collections, where N is the heap size plus	*/
	/* a rough estimate of the root set size.	*/
	/* Initially, GC_free_space_divisor = 4.	*/
	/* Increasing its value will use less space	*/
	/* but more collection time.  Decreasing it	*/
	/* will appreciably decrease collection time	*/
	/* at the expense of space.			*/
	/* GC_free_space_divisor = 1 will effectively	*/
	/* disable collections.				*/

So try setting GC_free_space_divisor to 3 or 2.

> Apparently setting MERCURY_OPTIONS='-sh2000' does not
> have an effect. 

Yes, the `-sh' option only has effect for grades without GC,
and you don't want that, because as you found out, you'll
run out of memory.

> Also on NT (Cygnus beta-17,no patch) the time reported by
> report_stats is always 0. Is that a Cygnus or Mercury  problem?

I think it is a Cygnus problem.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the users mailing list