01-21-2009 02:04 AM
I have a cRIO-9004 controller with cRIO-9103 chassis.
There is a memory leakage in part of my code for interfacing the FPGA code using DMA FIFO transfers.
The issue is eating away memory until the application stops on its own due to memory shortage.
I know this because I already tried disabling code parts and the part with DMA FIFO reads showed up as the problem.
The strange thing is that only one of the 2 DMA FIFO reads (2 different FIFOs) is causing trouble.
I have one that transfers about 3600 elements each second and doesn't seem to have a leakage problem.
The otherone however has almost never elements to read, causing it to time out all of the time (every second).
The same thing happens when using an IRQ to signal for data on the troubled DMA FIFO, waiting for the IRQ also slowly eats memory.
Is this a bug?
NOTE: The original code was recompiled from version 8.0.
01-21-2009 04:47 AM - edited 01-21-2009 04:48 AM
I changed the timed-loop to a normal while loop with wait for next multiple timing, and the timout on the fifo read to 1 millisecond instead of 100 and it seems that its not eating memory anymore. I still like to know what might cause this problem the occur.
The fifo read doesn't seem the handle a timeout value of 100 to 100ms very well. System becomes unresponsive.
01-23-2009 11:57 AM
Hi Andre,
Could you post your code so I could take a look at it and possibly try to reproduce it here? We don't have any memory leaks with the DMA FIFOs reported yet (that I've been able to find anyway), so if there is a possible bug I want to investigate it.
01-29-2009 03:27 AM - edited 01-29-2009 03:33 AM
Sorry it took so long for me to respond. I didn't get the notification by email.
You mention that you don't have reports about DMA FIFO, but do you have reports on Wait for IRQ?
However I'll try and make something up that show the memory leakage. It seems to have to do with having a timeout on the wait for IRQ and Read FIFO methods. They consume 100% cpu time during the time out. So a 500 ms time out on both renders my cRIO unresponsive. Could this mess up memory management on the RIO?
A timeout of 1 or 0 ms doesn't pose this problem, at least not in a way that is noticed during one day.