Jump to content

Allocate up to 4G of RAM in LabVIEW


MikaelH

Recommended Posts

4G of RAM when running Vista 64 bit

Everywhere you read it tells you that you can allocate 4G of RAM when running LabVIEW on Vista 64 bit OS.

But I can’t get it working, on my VISTA-64 machine that has 8G of RAM installed.

First thing I found is that when running a small memory hungry application in LV8.6 development environment it can allocate more memory compared when I run it as an executable.

post-941-1232661973.png?width=400

The “Size” value could be 32767 on Vista-64 in when running it from the development environment, but only 28623 when running it as an exe.

Maybe why “Size” only could 32767 (2^16)/2 is a limitation of how big LabVIEW allows arrays to be.

When using the value 32767, LabVIEW allocated 1.07 G of RAM, I can see this in the task Manager also.

The Value 28623 corresponds to only 0.82G. Why can I only allocate 0.8 in one array in an executable?

So if there where a limit of how big one Array could be, I copied the code above so 2 arrays of the same size should be allocated, that means 2.14 G of RAM.

(I could actually only set the Size to 32729. before I got Out Of Memory)

post-941-1232661993.png?width=400

So I could only allocate 2G of RAM.

So what am I doing wrong?

The scariest thing is when I convert this second application into an executable. The application gets limited to 0.8G of RAM. I could only get the Size value up to 20300 which is 0.82G.

Cheers,

Mikael

Link to comment

I’ve gotten some answers from NI regarding my problem.

First there is a known bug in LabVIEW that prevents the runtime engine to allocate as much memory as the development environment.

Second problem is that I tried to allocate a big chuck of memory at once. If Windows can’t give LabVIEW a continuous bit of memory from the RAM with this size you get the “Out Of Memory” message.

There are memory defragment program that can make it better.

I tried to allocate many small chucks of memory than it works better, but still an executable can’t allocate as much as I can from the development environment.

//Mikael

Link to comment

QUOTE (MikaelH @ Jan 22 2009, 11:49 PM)

I’ve gotten some answers from NI regarding my problem.

First there is a known bug in LabVIEW that prevents the runtime engine to allocate as much memory as the development environment.

Second problem is that I tried to allocate a big chuck of memory at once. If Windows can’t give LabVIEW a continuous bit of memory from the RAM with this size you get the “Out Of Memory” message.

There are memory defragment program that can make it better.

I tried to allocate many small chucks of memory than it works better, but still an executable can’t allocate as much as I can from the development environment.

//Mikael

NI has "LabVIEW 64bit Pioneer" available under their beta test program. (go to "www.ni.com/beta")

If beta software is an option, then you may find this helpful.

Link to comment

QUOTE (crelf @ Jan 24 2009, 01:28 AM)

Do you know wha tthe numbers are? ie: how much we can allocate in the RTE vs the Dev Env?

No, I don't know what the numbers are, but a single array could not be larger than 0.8G that's for sure.

Regarding switch to a 64 bit Beta, I don't think I dare.

Cheers,

Mikael

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.