LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone else seen issue with trying to allocate more than 1Gig of memory for a buffer?

Hi DF,

You have been quite helpful and persist in that state!

You said "The end result would be an array of VI references,".

If I use these references to do call "call by reference" then all of these calls execute in the UI thread (I believe).

When an application uses a dll that is not thread safe, it runs in the UI thread.

This approach sounds like I end up doing all of my important work in the UI thread. I usually try to avoid that situation.

Any thoughts?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 31 of 33
(1,085 Views)
Ben, I do believe you are correct. I usually don't stress out too much about running in the UI thread unless it impacts my performance enough to cause problems. It very well might in your case, since just about everything will be running there. However, I usually find something to get relief. In this case, you might try allocating your data as an array of clusters, each cluster containing an array. In this way, you get the same effect as the LV2 global, but you are now running in a non-UI thread. You can keep the data in a local shift register for easy access. The down side is that you will now have a gigabyte sized wire, so you have to be very careful about using it. It is probably doable, however, especially in LV7.1, where the in-placeness is fairly good.

Check out the attached VI (LV6.1) for a simple test of this concept. Since the channels are allocated separately from the main array, you can use non-contiguous memory and get more of your total memory. I managed to allocate about 1.5GBytes on a system with 0.5GBytes of physical RAM using channels with 50,000 data points. Yes, it took awhile, and my disk drive aged 5 days in 5 minutes.

I have also had some success with non-thread-safe DLLs (HDF5, for example) by using LabVIEW methods (e.g. semaphores, notifiers, etc.) to ensure serial access and calling as reentrant to avoid the UI thread. Performance increases, but you have to be very careful. Not all DLLs will handle this gracefully.
Message 32 of 33
(1,062 Views)
I reduced the usage a bit more(.12k) by using the output of the first initialize array to feed the input on the second.
Message 33 of 33
(1,050 Views)