LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Deallocation in Labview 7.0

I am writing an application that analyses a log file. The log file is >20MB. The main VI calls sub VIs to Read in, process and analyse an individual log file. When I read in the data, process it ready for the user to analyse it, the total memory allocated to LabVIEW is approx 240MB more than prior to reading in the log file. This is fine as I have enough memory to handle this. I have setup all my sub VIs that do the pre-processing and analysis to deallocate memory after use via the "Request Deallocation.vi". However when I stop the analysis ready to load another file (ie program control is back to the main VI) the memory deallocation doesn't appear to deallocate any memory. The only way LabVIEW releases any of the memory is when
the application is closed.
Is there any suggestions or thoughts on why this is happening. I can't post the application as there is third party IP invloved. I also can't upgrade to LabVIEW 7.1 at this point.
Cheers,
Wayne
0 Kudos
Message 1 of 2
(2,777 Views)
Hi,

Request Deallocation.vi can only deallocate unused memory. It does not
release any memory that might still be used. Sometimes it is hard to figure
out for LabVIEW if the memory can still be used, e.g. when the data is in a
shift register. There is no way for LabVIEW to see if the data in the shift
register is ever needed, so it will not be released. The memory might also
be located in the main. Indicators and controls that display the data also
use the same amount of memory. You can use the profiler to see which VI
takes the memory.

There are ways to release the memory. If there is data in a shift register,
make a case "clear" inside the while loop, and fill the shift register with
an empty array. You can also start the VI dynamically. Once the last
reference to the VI is closed, the memory used by the VI will be released.
It's hard to say what's best without seeing the code.

Regards,

Wiebe.


"WPS" wrote in message
news:5065000000080000001AE20000-1079395200000@exchange.ni.com...
> I am writing an application that analyses a log file. The log file is
> >20MB. The main VI calls sub VIs to Read in, process and analyse an
> individual log file. When I read in the data, process it ready for
> the user to analyse it, the total memory allocated to LabVIEW is
> approx 240MB more than prior to reading in the log file. This is fine
> as I have enough memory to handle this. I have setup all my sub VIs
> that do the pre-processing and analysis to deallocate memory after use
> via the "Request Deallocation.vi". However when I stop the analysis
> ready to load another file (ie program control is back to the main VI)
> the memory deallocation doesn't appear to deallocate any memory. The
> only way LabVIEW releases any of the memory is when the application is
> closed.
> Is there any suggestions or thoughts on why this is happening. I
> can't post the application as there is third party IP invloved. I
> also can't upgrade to LabVIEW 7.1 at this point.
> Cheers,
> Wayne
0 Kudos
Message 2 of 2
(2,777 Views)