LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application limit to 1G memory allocation

My application uses a lot of memory. I break the memory allocation to small arrays of 100M each.

I have Windows XP 32bit and I set the /3GB flag in the boot.ini file, the computer has 4G byte of ram memory. Never the less, Labview (ver 8.2) can't allocate more then 1G byte memory.

Why?

Attached small vi that represents the problem.

 

Regards

Gabi

0 Kudos
Message 1 of 14
(3,834 Views)
Hi Gabi,

using your example (slightly modified as attached) I could allocate upto 11 chunks of memory resulting in LV using 1.2GB of (virtual) ram.
My machine is using WinXP 32bit on 1GB of real ram.

Keep in mind: you already allocated 100MB of ram by initializing the array before the while loop!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 14
(3,822 Views)

hi there

according to http://digital.ni.com/public.nsf/allkb/AC9AD7E5FD3769C086256B41007685FA the maximum amount of memory for LV 8.2.1 is 2GB. check if there are some extra copies of your arrays. and be aware that LH has to share the memory with all the other applications and services runnnig on yout plattform.

what kind of data are you dealing with? if it's digital data then take a look at the "Digital compress" and "Digital uncompress" VIs from the Digital Waveform palette.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 14
(3,819 Views)

Hi

Thanks for your prompt replay.

Now I am limited to 1.5 GByte (I increased the number of the shift Register).

Do you have an idea why?

Regards

Gabi

0 Kudos
Message 4 of 14
(3,810 Views)
Hi Chris
The data is array of U8 (1 byte). I have to process this data heavily, so compressing will slow down the process.
Regards
Gabi
0 Kudos
Message 5 of 14
(3,805 Views)
Hi Gabi,

do you have to process them all at the same time?
Can't you create some sub-steps of calculations to save those results to files on disc?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(3,803 Views)

Hi

In case there is no way to allocate more then 1.5 G, the only way to bay pass this limitation is the way you suggested to use the hard disk to load data piece by piece. This will increase the overall time because each piece of data is processed several times and it depends on the result of the other data processing.

Regards

 

0 Kudos
Message 7 of 14
(3,793 Views)

Well if you managed to get 1.5 Gig then you beat my best which was 1.2 G.

The issue is the hardware of the pentium chip and the OS.

The MSB of the address distinguishes between OS memory space and program space which limits you to 2G max.

64 bit machine may let you go farther but I have not tested this myself.

The other factor that has to be taken into concideration is that LV insists all of its buffer be contiguous so if the OS can not find a contiguous block, the allocation fails.

Quoting from JPD signature;

"All of the above may be wrong!" Smiley Sad

If you know better, then by all means straighten me out. Smiley Happy

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 14
(3,785 Views)
I don't think anyone has mentioned this yet, but LabVIEW 8.5 is large address aware, meaning it can be set to allocate up to 4GB of memory on a 64-bit machine, and 3GB on a 32-bit machine. From the LabVIEW help:

Enhancing Virtual Memory Usage

(Windows) LabVIEW 8.5 is large address aware. On a 64-bit operating system, LabVIEW can access up to 4 GB of virtual memory by default. On a 32-bit OS, LabVIEW can access up to 2 GB of virtual memory by default. You can enable LabVIEW to access up to 4 GB of virtual memory on a 32-bit OS by modifying the Windows boot configuration settings. Enabling LabVIEW to access more virtual memory decreases the likelihood of experiencing general LabVIEW errors related to memory allocation when you work with large sets of data.


Jarrod S.
National Instruments
Message 9 of 14
(3,774 Views)
Hi Jarrod,

thanks for mentioning this.

Now I'm waiting for LV8.5 (somewhen in autumn, campus license 🙂 to sieve primes upto 2^32 even faster Smiley Very Happy Until now LV was limited to ~2^31 on my machine when using the faster algorithms Smiley Sad

Message Edited by GerdW on 09-12-2007 04:25 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 14
(3,770 Views)