[BRLTTY] Solaris memory leak, maybe windows too

Willie Walker William.Walker at Sun.COM
Thu Aug 20 08:33:49 EDT 2009


To follow up - I let the BrlTTY from svn trunk (the version with Dave's  
fix) run over night.  The pmap output is identical to what it was  
before I went to bed.

I will let this run today while I do more development on Orca (it  
involves starting/stopping Orca many times throughout the day and today  
will also be a particularly heavy braille display day for me) and keep  
a track on the pmap output.

In any case -- I need to repeat that I'm very impressed with Samuel and  
Dave. You guys rock.

Will

On Aug 19, 2009, at 10:35 PM, Willie Walker wrote:

> Thanks Dave and Samuel!
>
> It seems to function well.  I ran BrlTTY and monitored the pmap -x
> output while I used Orca.  The stack remained at a steady 12K and the
> total size remained at a steady 5.5M.
>
> I've had it running for the past hour and have started/stopped Orca  
> many
> times during that period.  It seems quite stable.
>
> Many thanks!  This was a tricky one to find, and I admire Samuel's
> ability to track it down and Dave's ability to flip over a patch so  
> quickly.
>
> Will
>
> Dave Mielke wrote:
>> [quoted lines by Samuel Thibault on 2009/08/20 at 00:57 +0200]
>>
>>> So for variable-length arrays, the standard doesn't say that its
>>> lifetime extends only to the end of the block, thus allowing  
>>> compilers
>>> to be lazy and just allocate them on the stack and not free them.   
>>> The
>>> only portable way to free them is thus to return from the function
>>> containing the block.  For brltty, that means making the content of  
>>> the
>>> while(1) loop a function called by runProgram, else its  
>>> variable-length
>>> arrays keep getting allocated and never freed.
>>
>> Thanks.
>>
>> Will: Please try the attached patch (stack-1.patch). If it works,  
>> I'll clean it
>> up a bit and commit it.
>>
>>
>>
>> ---------------------------------------------------------------------- 
>> --
>>
>> _______________________________________________
>> This message was sent via the BRLTTY mailing list.
>> To post a message, send an e-mail to: BRLTTY at mielke.cc
>> For general information, go to:  
>> http://mielke.cc/mailman/listinfo/brltty
>
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to:  
> http://mielke.cc/mailman/listinfo/brltty



More information about the BRLTTY mailing list