LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI allocates more memory than it's expected

Hi, the attached VI should initialize array 500x6000 of doubles which means aprox. 23MB in memory. So why does it in fact allocates 96MB? There is no additional buffer allocation so no reason for this behaviour. Or did I somehow miscalculated? (the behaviour is same when I create exe, either when I check the mem. alloc. in Profile Performance and Memory ) thx for reply

Message Edited by ceties on 12-07-2007 03:23 PM
LV 2011, Win7
0 Kudos
Message 1 of 2
(2,418 Views)
You should have two copies, one for the array data and one for the indicator. You have one extra copy because your entire array is derived from diagram constants, meaning it is precalculated at compile time and folded into a constant. This is your third copy. Change any of the three inputs of "initialize array" to a control and the data memory will go down to about 46MB because it can no longer be folded.
 
If you clear the array indicator, the memory goes down to 23MB.
 
This is just my quick analysis and I could be wrong. Somebody from NI can probably give more details. 🙂


Message Edited by altenbach on 12-07-2007 01:40 PM
0 Kudos
Message 2 of 2
(2,410 Views)