Not Enough Memory to Complete This Operation Error

Updated Nov 7, 2023

Reported In

Software

  • LabVIEW FPGA Module
  • LabVIEW

Issue Details

  • I am using an FPGA target with DRAM. When I try to simulate the DRAM in my LabVIEW project, I get the error: Not enough memory to complete this operation. 
  • I am using a computer with limited memory and trying to store a lot of data in an array (e.g. 40 million data points). After running the code for a while, I receive the error: Not enough memory to complete this operation.How do I resolve this error?

Solution

  1. Ensure that your computer and LabVIEW are both within their memory limits. Refer to the LabVIEW Memory Allocation document to determine if LabVIEW is within its memory limits.
  2. If they are both within the limits, reduce the size of your simulated DRAM so that it is less than 2 GB. Either reduce the requested number of elements (as shown in the following image) or switch to a smaller data type.
  1. Increase the Virtual Memory of your Windows machine.
  2. If you're running into this error when reading data into LabVIEW, try reading less data at a time or reading data more frequently.

Additional Information

If you are new to programming on an FPGA with LabVIEW, it will be worthwhile reviewing NI LabVIEW High-Performance FPGA Developer’s Guide . This error can occur due to not following best practices when using FPGAs. For example, using lots of front panel items such as indicators an graphs.

There is a known issue in LabVIEW where simulating more than 2 GB of DRAM can result in a memory error. It is not related to LabVIEW's memory limit, so it will occur even when LabVIEW does not run out of memory.

Additionally, you can use the Performance Profiler to track which programs are causing the memory growth to occur. Consider reducing data produced in this VI, changing the architecture to a more efficient one such as Producer/Consumer, etc.