[Gc] GC Warning: Repeated allocation of very large block

mijobee at mijobee.com mijobee at mijobee.com
Sun Oct 29 16:46:14 PST 2006


Hello Everyone,

I was hoping to get some advice on getting rid of the following  
warning message:

GC Warning: Repeated allocation of very large block (appr. size  
1986560):
         May lead to memory leak and poor performance.

I've read the docs at: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ 
debugging.html but I have a few questions.  First does it sound  
reasonable that the reason I'm getting that warning is because I'm  
allocating a large block of uninitalized memory typed as an array of  
pointers so the GC is seeing lots of bogus pointers?  Also I'm not  
sure if I understand the following statement also found in the  
aforementioned docs:

... realloc size increment should be fairly large (e.g. a factor of  
3/2) for this to exhibit reasonable performance

Is this just saying that the amount of memory allocated should be  
doubled or tripled when growing a memory region when implementing  
something like a variable length array class?  Thanks in advance.

-
Mijobee


More information about the Gc mailing list