[Gc] RE: GC_gcollect and memory usage increase

Simon Tsai mtsai at adobe.com
Wed Nov 29 15:05:32 PST 2006

I trace the gc library and found out I need turn on
GC_OPERATOR_NEW_ARRAY flag in my application (c++). I need call GC_FREE
for GC_MALLOC. One of my applications will run ok. But I have another
application; it keeps allocating memory with GC_MALLOC_UNCOLLECTABLE and
free memory with GC_FREE. It also calls GC_MALLOC. From my trace, the
GC_MALLOC_UNCOLLECTABLE can accumulate a few GBytes. The GC_MALLOC may
only have 100 Mbytes. When my application calls GC_gcollect() &
GC_invoke_finalizers() , the memory starts to jump. 
1. Does gc library really free UNCOLLECTABLE memory? Or it just keeps
the memory in library for reuse? 
2. When does gc library free UNCOLLECTABLE memory?
3. Do I call GC_gcollect and GC_invoke_finalizers at the same time? Or I
just need call GC_gcollect every few minutes?


More information about the Gc mailing list