LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory management

Hi,

I want to improve the memory management in my own labview program.

How does the structure "In Place Element Structure " work? I'd like to use it when  I build arrays...

thanks

Silvia   

0 Kudos
Message 1 of 4
(2,200 Views)
You can't use the "In Place Element Structure" to build arrays, exactly, as the structure may only be used where the memory has already been allocated. If you know what dimensions of an array you will need, however, you can create an array of constants, and then use the "Replace Array Subset" function to essentially build an array with your data. You could then use the "In Place Element Structure" for this task (although, I believe the LabVIEW algorithms for in-placeness will already treat the data this way). Hope this helps!
-Cory
0 Kudos
Message 2 of 4
(2,195 Views)
Well, if you use "built array", you cannot do it "in place", because the size of the array changes. The new array needs more space and thus LabVIEW needs to make a new copy in memory. There is no way around this.
 
Typically you would preallocate an array of fixed (and sufficient) size and then replace elements as needed. If you do this correctly in a shift regsiter, the operation is already "in place" and the "in place" structure will not give you any additional advantage. 🙂
 
Please tell us a bit more specifically what you are trying to do and what kind of memory problems you are having.
0 Kudos
Message 3 of 4
(2,193 Views)
duplicate post...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,179 Views)