Hi,

I'm using dsplink 1.60 with latest git kernel. I noticed that dsplink leaks 
some kernel memory during starting/stopping of a dsp application. I know 
this is expected per [1] but this condition is hard to satisfy. Consider an 
application 
consisting of dsplink + codec engine + dmai + gstreamer + some gui library. 
I tried to satsify this condition on my application and fixed all the known 
issues 
related to gstreamer-ti libraries. However, when I continuesly start/stop my 
application dsplink leaks _kernel_ memory so I'm forced to restart kernel at 
some 
point. This issue was also reported at [2].

So I tried to track source of memory leak in dsplink. I modify MEM_Alloc and 
MEM_free 
functions in mem.c. I keep a log of unfreed allocations in dsplink. I export 
these 
information to userspace via sysfs interface. My userspace application monitors 
sysfs file and notifies dsplink when all the users are closed and dsplink 
kernel 
module frees those un-allocated allocations.

I have 2 questions:

1) Is there any way to know in dsplink kernel module that all dsp users are 
shut down 
so that kernel module can free unfreed allocations without userspace 
intervention?

2) What are the potential drawbacks of this solution. For instance, at module 
load time
dsplink performs 3 permanent allocations(*) so I keep track of these 
allocations and do not 
free those areas. Is there any possibility of more permament allocations during 
run time?

Thanks,
Caglar

(*) By permanent allocations I mean memory needed during whole dsplink module 
life time.

[1] 
http://wiki.msp430.com/index.php/DSPLink_FAQs#Are_there_any_restrictions_on_when_an_open_message_queue_can_be_closed.3F
[2] 
http://www.mail-archive.com/[email protected]/msg09949.html

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to