Email Correspondence to following topic: AW: AW: [Tremor] Question to memory leaks in Tremor

Lorber, Markus markus.lorber at siemens.com
Thu Sep 21 09:16:38 PDT 2006


Hello Frédéric,

I tried out your patch in the Tremor code version I am working with. Things have improved a little bit. But the heap still isn't cleared completely after having finsihed playback of one file. So in my Code Version there seem to be other allocated memory segmnets, which are not freed correctly.
I have overcome my problem by using a separate heap for each OggVorbis Channel. That is possible on the Blackfin DSP I am working with. And luckily I have enough memory space on the platform I am working with. After playback I clear the channel specific heap by a special function of that DSP to avoid heap overflows.

Thanks for your help and best regards,
Markus 

-----Ursprüngliche Nachricht-----
Von: Frédéric Bastien [mailto:nouiz at nouiz.org] 
Gesendet: Mittwoch, 20. September 2006 17:01
An: Lorber, Markus
Betreff: Re: AW: [Tremor] Question to memory leaks in Tremor

Does anybody know who can commit to the svn, so that the patch is 
present for everybody?

thanks

Frédéric Bastien

Lorber, Markus wrote:
> Hello Frèdèric,
> 
> As I am working with the lowmem branch, I could try out your patch! Thanks a lot for your information!
> 
> Best,
> Markus 
> 
> -----Ursprüngliche Nachricht-----
> Von: Frédéric Bastien [mailto:nouiz at nouiz.org] 
> Gesendet: Mittwoch, 20. September 2006 16:35
> An: Lorber, Markus
> Betreff: Re: [Tremor] Question to memory leaks in Tremor
> 
> Hi,
> 
> I have send a patch to the mailling list to solve the memory leak. I'm 
> not sur it was for witch branch of Tremor, but I think it was for 
> lowmem. You could use it to make the appropriate correction or if you 
> use another branch to help you find out. I don't know if somebody made a 
> commit of my patch as I can't do a commit.
> 
> The email for the patch is here:
> http://lists.xiph.org/pipermail/tremor/2004-October/001112.html
> 
> Frédéric Bastien
> 
> Lorber, Markus wrote:
>> Hello,
>>  
>> I am working with Tremor (codec source as of date 2002 09 02, version 
>> 1.0.0) on a Blackfin DSP. Basically my implementaion works but there 
>> remains a problem with memory leaks. If I playback an OggVorbis File 
>> several times (were I always call ov_open_callbacks(),..., ov_read(), 
>> ov_clear() similar to the example code), it ends up in a DSP-exception 
>> because of a heap overflow.
>>  
>> I found some hints in the Tremor forum that there exists a memory leak 
>> problem. Is that correct or could it be that I do a wrong usage of 
>> the API-functions (e.g. ov_clear())? 
>>  
>> I am planing to do a work-around by implementing a list, were each 
>> pointer allocated by malloc(), calloc(), realloc() is written to. Every 
>> free() (and if neccessary every realloc() ) would clear the 
>> corresponding pointer in the list. Finally after having finished an 
>> OggVorbis stream, I would do a free() on each pointer remaining after 
>> ov_clear() to clean up the heap.
>>  
>> My question now is: Does enyone have suggestions for a better 
>> work-around or does a newer version of Tremor exist, which overcomes 
>> the memory leak problem?
>>  
>> Thank you and best regards,
>> Markus
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Tremor mailing list
>> Tremor at xiph.org
>> http://lists.xiph.org/mailman/listinfo/tremor


More information about the Tremor mailing list