LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exit labview (executables) after using large text files

Just a point - as far as I know, locals are not guranteed to cause copies (at least not in the newer versions, 6.0 wasn't as good), but the copies are created because of the parallelism. There are places where a copy is impossible to avoid if you want to keep both the data coming from the local and the original data. Also, as mentioned, the resizing operations tend to create copies. There is a document in the bookshelf I mentioned earlier which explains this in some detail. If you can't find it there, search the site for app note 168 (performance and memory management).

___________________
Try to take over the world!
0 Kudos
Message 11 of 14
(734 Views)
For safety, local variables always make a copy when read.  You should check out the tutorial Managing Large Data Sets in LabVIEW. You won't be able to use the buffer viewer mentioned, but all the other methods for looking at memory use are still valid. The methods of dealing with large memory allocations are also valid. Unfortunately, the sample code uses event structures, which did not appear until LV6.1, so a port to 6.0 is not possible for half of it. Let me know if you are interested in a partial port of the demos and I can do that for you..
0 Kudos
Message 12 of 14
(713 Views)

DF, there are probably some cases where LV could manage without creating copies.

For example, would locals create copies even if place them in different frames of a sequence structure?

Obviously, you could say there is no need for that, but it does happen that people use locals even when there is no "real" need for it.


___________________
Try to take over the world!
0 Kudos
Message 13 of 14
(711 Views)
tst, I don't think locals make a copy until actually read.  So if you have multiple locals in different frames of a case structure, only one would generate a copy.  However, I am pretty sure you get a copy at each read.  LabVIEW is smart enough to reuse memory, so it isn't quite as bad as it could be, but it is something to watch out for.  If you really need to know, try it and find out.  Put something big (1-10MBytes) in your local, then single step through your code keeping on eye on your system memory monitor.
Message 14 of 14
(696 Views)