Why Do I Receive Error -1074396159: Not Enough Memory in My Vision Application?

Updated Apr 29, 2019

Reported In

Software

  • Vision Development Module

Driver

  • NI-IMAQ

Issue Details

When I attempt to acquire a very large image, such as 2,000 x 160,000 pixels, I receive the following error:

Error -1074396159 Not enough memory for requested operation.


My computer has plenty of memory available, so why am I getting this error?

Solution

There must be enough contiguous free memory available to accommodate an image when it is acquired. If the system does not have the required amount of contiguous free memory, then the image cannot be created. 
 

Additional Information

Whether or not there is enough contiguous free memory is handled by the Operating System. When IMAQ requests a block of memory, the Operating System either replies with an address to the memory location or denies the request due to insufficient resources.

One way to improve the chances that a large enough contiguous memory block exists is to remove as many startup applications as possible then reboot the machine. With many programs loaded, fewer large contiguous memory blocks are available. Additionally, third-party memory defragmentation programs can be used to clean up memory, decreasing the probability of a memory request being denied.