[Gc] [PATCH] Re: GC memory leak on OSX Tiger

Bruce Hoult bruce at hoult.org
Wed Jan 11 00:38:35 PST 2006


On 2/01/2006, at 10:32 PM, Stephane Epardaud wrote:

> Aha, surely that would be the leak we've been noticing when  
> compiling with
> pthread support under OSX. Thanks a lot for the patch, I hope it  
> works on the
> 7alpha too :)
>
> Bruce Mitchener wrote:
>> This is due to task_threads() allocating an array in  
>> darwin_stop_world.c
>> that is not then deallocated with vm_deallocate().
>>
>> This can be fixed with this trivial attached patch.
>>
>> I've only tested it under OS X 10.4.3 as that's all that I have  
>> handy.
>>
>> - Bruce
>>
>> Bruce Hoult wrote:
>>
>>> It seems that there is a memory leak on both 6.5 and 6.6 under OSX
>>> 10.4.3.
>>>
>>> #include "gc.h"
>>>
>>> int main(){
>>>      while(1){
>>>          GC_malloc(10000);
>>>      }
>>>      return 0;
>>> }
>>>
>>> ... continuously increases the various memory sizes in top.


Yes, I'm quite sure this is what everyone on OSX has been complaining  
about since July or so.  And Bruce's patch works perfectly for me.

I hope this makes it into the next release!



More information about the Gc mailing list