Well, if both the memory available and the memory used keep on increasing with the available increasing faster than that used, then you're safe since on balance there's more memory available for matlab. Of course, if the memory available for all arrays increases while the memory used by matlab also increases that means that some other program is using less memory. So, at some point that other program will settle down to its minimum usage and then the increased usage by matlab may be become a problem.
Whether or not you'll run out of memory depends on how much memory you have, how long you want to run for and what the rate of memory increase is. You'll get a out of memory error if:
- memory available for all arrays decreases to 0
- you try to increase the size of an existing array (e.g. by adding elements) so that its memory requirement are higher than maximum possible array size.
Best Answer