Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Memory Usage

Identify and reduce memory requirements

MATLAB® handles data storage for you automatically. However, in high memory usage applications, it can be beneficial to determine the memory usage of your code. You can learn techniques to write code that uses memory more efficiently.

Functions

memory Display memory information
inmem Names of functions, MEX-files, classes in memory
pack Consolidate workspace memory

Topics

How MATLAB Allocates Memory

MATLAB handles data storage automatically. However, understanding how MATLAB allocates memory can help you use memory more efficiently when writing code.

Strategies for Efficient Use of Memory

Reduce the amount of memory your program requires, determine the appropriate data storage, avoid fragmenting memory, and reclaim used memory.

Resolve "Out of Memory" Errors

MATLAB generates an Out of Memory message whenever it requests a segment of memory from the operating system that is larger than what is available.

Was this topic helpful?