cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nenghan
Participant
Participant
323 Views
Registered: ‎06-07-2018

DMA proxy example's memory leakage

Hi, I am using the DMA proxy example and is able to execute dma-test with success in the transfer and reception of data in a loopback fashion. 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space 

However i discovered that after the dma-test performs the closure, i.e. munmap(tx_proxy_interface,...) munmap(rx_proxy_interface,...) and even close (tx_proxy_fd); and close(rx_proxy_fd), the memory is still held on by the application and not released.

I found this after i incorporated the dma-proxy example into my application and found that after a period of time of dma transfers, the application crashes as it has run out of memory. My debugging trace the issue back to the dma-test and when i place monitoring of allocated virtual memory, i saw that the memory was never deallocated, even at the very end of the codes where supposedly all proper closure are performed.

Please help to look at this case. Thank you.

0 Kudos
2 Replies
nenghan
Participant
Participant
247 Views
Registered: ‎06-07-2018

Hi are there anyone that faces this issue? Will this be in the next patch?
0 Kudos
nenghan
Participant
Participant
180 Views
Registered: ‎06-07-2018

This is very frustrating...

The dma-proxy works but it just accumulates in memory and later crashes due to inability to get more memory.

I scan through the dma-proxy codes and there seems no malloc created other than the initial TX and RX. I dont know why the memory keeps increasing..

I just dont understand why this issue is not faced by others before..

0 Kudos