Thread Subject: clear all does not clear all memory?

Subject: clear all does not clear all memory?

From: Joao

Date: 4 Dec, 2008 16:44:02

Message: 1 of 3

Hi all,

I've been running some simple, but quite lengthy calculations in Matlab (R14).

In order to save RAM, for each cycle, variables are cleared by a "clear all" command.

But this does not solve everything, since I can tell by the Windows task manager that memory is still taken by Matlab (wich can exceed 1.5 GB) even after my program has crashed or ended, and even if I cleared all variables with a "clear all". Memory is only freed if I shut down matlab and restart it.

Is there any command that really clears all the cache?

Thank you!

 


Subject: clear all does not clear all memory?

From: Praetorian

Date: 4 Dec, 2008 21:33:02

Message: 2 of 3

On Dec 4, 9:44=A0am, "Joao " <joao_ama...@mail.pt> wrote:
> Hi all,
>
> I've been running some simple, but quite lengthy calculations in Matlab (=
R14).
>
> In order to save RAM, for each cycle, variables are cleared by a "clear a=
ll" command.
>
> But this does not solve everything, since I can tell by the Windows task =
manager that memory is still taken by Matlab (wich can exceed 1.5 GB) even =
after my program has crashed or ended, and even if I cleared all variables =
with a "clear all". Memory is only freed if I shut down matlab and restart =
it.
>
> Is there any command that really clears all the cache?
>
> Thank you!

I don't know whether this will fix your problem but you could try
running the PACK command after CLEAR ALL.

HTH,
Ashish.

Subject: clear all does not clear all memory?

From: Joao

Date: 5 Dec, 2008 11:54:02

Message: 3 of 3

Praetorian <ashish.sadanandan@gmail.com> wrote in message <34813a0b-28df-4e25-8a2f-a790fde16603@35g2000pry.googlegroups.com>...
>
> I don't know whether this will fix your problem but you could try
> running the PACK command after CLEAR ALL.
>
> HTH,
> Ashish.

Hi, thanks for the reply.

The pack command did not directly solve the problem, but helped me reach documentation that addresses this.

No real solution, as this seems to be related to Win32 platform memory management. I actually solved this by using the matlab compiler and running the exe file. No more memory problems.

Cheers,
Joao

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com