Limit memory or display memory usage for Image Acquisition Toolbox software
mem = imaqmem
Number between 0 and 100 that gives a general idea of current memory utilization.
Total number of bytes of physical memory.
Number of bytes of physical memory currently available.
Total number of bytes that can be stored in the paging file.
Number of bytes available in the paging file.
Total number of bytes that can be addressed in the user mode portion of the virtual address space. This is a Windows® only property.
Number of bytes of unreserved and uncommitted memory in the user mode portion of the virtual address space. This is a Windows only property.
Total number of bytes image acquisition frames can occupy in memory.
By default, the toolbox sets this limit to equal all available physical memory at the time the toolbox is first used or queried.
Number of bytes currently allocated by the Image Acquisition Toolbox™ software.
imaqmem(limit) configures the frame memory limit, in bytes, for the Image Acquisition Toolbox™ software. limit is used to determine the maximum amount of memory the toolbox can use for logging image frames.
Note Configuring the frame memory limit does not remove any logged frames from the image acquisition memory buffer. To remove frames from the buffer, you can bring them into the MATLAB® workspace, using the getdata function, or remove them from memory, using the flushdata function.
The imaqmem function is being deprecated. In R2014b the function still works, but you get a warning. In R2015a the function will be removed, and you will get an error. For R2014b, you get this warning:
Warning: IMAQMEM will be removed in a future release. It is recommended that you do not limit the frame memory limit for the toolbox. To check memory usage, use MEMORY for Windows platforms or your operating system commands such as "top" for UNIX platforms.
If you have any code that uses this function, remove it to avoid the warning and the error in the future.
Use imaqmem to get information about system memory.
imaqmem ans = MemoryLoad: 85 TotalPhys: 263766016 AvailPhys: 37306368 TotalPageFile: 643878912 AvailPageFile: 391446528 TotalVirtual: 2.1474e+009 AvailVirtual: 1.6307e+009 FrameMemoryLimit: 38313984 FrameMemoryUsed: 0
Retrieve information about a specific field returned by imaqmem.
memlimit = imaqmem('FrameMemoryLimit') memlimit = 38313984
Specify the amount of memory available for the toolbox to log image frames (FrameMemoryLimit).
imaqmem(30000000) ans = MemoryLoad: 85 TotalPhys: 263766016 AvailPhys: 37634048 TotalPageFile: 643878912 AvailPageFile: 391479296 TotalVirtual: 2.1474e+009 AvailVirtual: 1.6307e+009 FrameMemoryLimit: 30000000 FrameMemoryUsed: 0