[Gc] Patch for MAX_HEAP_SECTS value

Boehm, Hans hans.boehm at hp.com
Mon Sep 14 10:15:51 PDT 2009

The patch looks fine.  But I don't think I fully understand why it's needed, making me a bit concerned that something else is wrong.

What are the sizes of the heap sections when the old value is too small?  The 256MB estimate for the old value may be too high, but I don't immediately see why it should be too high by that much.  Heap section sizes should initially grow exponentially until they hit the maximum size, which should happen after a relatively small number of expansions.  A few old mark stacks are also likely to get added to the heap.  But I'd still be surprised if we had more than about 50 heap segments that were smaller than the maximimum size.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ivan Maidanski
> Sent: Monday, September 14, 2009 6:37 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Patch for MAX_HEAP_SECTS value
> Hi!
> The value hard-coded for MAX_HEAP_SECTS in case of 
> SMALL_CONFIG is too small (the heap limit could be reached at 
> 2 MiB) to pass test.c in some configurations (the heap size 
> is roughly 16 MiB observed), so I've increased MAX_HEAP_SECTS 
> value by 2 (for SMALL_CONFIG).
> Here is the patch (ivmai137.diff).
> ChangeLog entries:
> 	* include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef;
> 	increase the value to 256 entries for SMALL_CONFIG (to pass the
> 	tests); add the comment.
> Bye.

More information about the Gc mailing list