[Gc] Suggestion for Windows version.

Roger Osborn roger.osborn at linguamatics.com
Fri Feb 29 00:28:53 PST 2008


First, as someone new here, I'd like to thank the people who maintain 
the list and who answer questions.

We are using Boehm GC  in a program that runs right up to the 2Gb user 
memory limit in 32 bit Windows. Because of this we quite often bounce 
off the condition where the VirtualAlloc call in GC_win32_get_mem 
returns zero.  This ultimately causes an abort with the "Too many heap 
sections" condition.

I was wondering whether there was any reason the canonical code could 
not be changed so that it only does the:

   GC_heap_bases[GC_n_heap_bases++] = result;

if result is non zero? We have changed this is in our code, but at first 
sight it looks like it might be the sort of change that would make 
things better for everyone, in that there is more chance of the out of 
memory callback function being called reliably rather than the program 
ending abruptly.

Roger Osborn

More information about the Gc mailing list