[Gc] Too Many Heap Sections

Matthew Bromberg mattcbro at earthlink.net
Wed Dec 28 21:33:56 PST 2005

I seem to be running into a fatal error message in the garbage collector 
stating that
there are too many heap sections.  Everything works fine until I 
increase the size of my application.

My application is running on windows XP 64 but it is a 32 bit 
application and is compiled with MS VC++ 6.0
My application is a kind of digital tree that uses GC_MALLOC to allocate 
all the internal nodes and leaves of the tree.  I expect there to be
a lot of small GC_MALLOC calls. 

The application is  not   expected to be particularly memory efficient, 
but the fatal error occurs after adding only 1 million entries to my 
data structure. I am currently using the single threaded version, 
although that will change in the future.
 I estimate that in the worst case this could consume 256 million bytes, 
but I have 2 Gbytes of RAM and at least that much again in a swap file. 
Is there anything I can do to make the garbage collector more robust in 
this situation?  Should I use  explicit GC_gcollect calls or are there 
other performance tuning parameters I should try?

More information about the Gc mailing list