LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

When applying a large array of memory overflow occurs, such as a [100000], how do

When applying a large array of memory overflow occurs, such as:double a [100000], how do?
0 Kudos
Message 1 of 3
(4,487 Views)

Hi,

 

The stack cannot handle large arrays.

 

Allocate your array on the heap, using malloc(): http://stackoverflow.com/questions/5746377/allocating-a-large-5000-array

Certified LabVIEW Developer
Message 2 of 3
(4,484 Views)

Alternatively, you can set the stack size in Build Options.

If your array size cannot be predicted previously the heap size suggested by JKSH is the best way to handle it. Remember to free the memory when you have terminated using it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(4,461 Views)