Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69213

memory de-allocation string arrays

$
0
0

I am working with tab delineated ascii string arrays and am having memory management issues. I have been able to reduce the memory usage thanks to a suggestion here:

 

https://forums.ni.com/t5/LabVIEW/spreadsheet-to-array-memory-problems/td-p/1547726

 

This is great, but has brought up another question that I am unable to find an answer for, and I, as it is not directly related to the original question and I am unable to find any information by searching on this topic, decided to ask it in a new post.

 

When I allocate memory for arrays using initialize array with doubles and use replace subset, etc, I can track memory usage going up when data is read, and then going up significantly more when array to spreadsheet string is used and then written to file. Once completed, when I de-allocate via using a "request deallocation" memory control function, my memory usage in labview returns to the same size as when the VI is initially loaded (e.g.. maximum usage might be 600mb, and after deallocation, labview memory usage returns to ~130 mb).

 

When the only change to the code made is to use strings in the initialize array, everything proceeds similarly (albeit using more memory because of the string vs double), but when the "request deallocation" memory control function is called, total memory usage returns to a level that is about 1/3 less than the maximum total usage during the run, rather than the level that was used when the vi was initially loaded (e.g.. maximum usage might be about 900 mb, and after deallocation around 630 mb).

 

Can anyone enlighten me on why "request deallocation" works differently with string arrays vs double arrays?


Viewing all articles
Browse latest Browse all 69213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>