LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"Out of Memory" message popup while running debug; But Release is OK

I get a message window "Out of Memory" when I run debug project after adding four functions to a separate .c/.h file.  The Windows Task Manager shows I use almost all the PF Usage too, which will not go down until I quit CVI.  I do not understand why I can run the release version without these problems. 

 

I systematically add these functions without calling them and it works until I add 2 out of the four.  And after some permutations, it doesn't seem to matter which two functions

 

 

0 Kudos
Message 1 of 2
(2,650 Views)

Debug builds add lots of code to check pointers, array dimensions, etc dynamically.  So debug executable image much larger than a production build.

 

I think stack usage is also greater with debug images, though not certain about that.  

 

You can try increasing the size of the backing file (paging file) with the control panel systems applet.   You can increase the stack size too in the CVI build target settings I believe it is.

 

If you want a tight image, I've found the Intel optimizing compiler to be pretty good, it runs with CVI all OK.   But optimizing for minimum size Vs. optimizing for maximum performance is a classic trade off in computing science and CVI apps are no different.

 

You can run XP with 3GB of user address space with a /3GB switch in boot.ini, but I've never gotten it to work.  

 

Time for NI to support 64 bit Windows!

 

Menchar

0 Kudos
Message 2 of 2
(2,644 Views)