Cell memory not released

Rabeeh Abbasi rabeeh36 at yahoo.com
Wed Jul 29 03:09:01 CDT 2009


> Apparently you are expecting it to shrink?

Yes, I do expect it to shrink. As it always shrink when you "clear" a (large) matrix object.

Regards,
Rabeeh




________________________________
From: John W. Eaton <jwe at octave.org>
To: Rabeeh Abbasi <rabeeh36 at yahoo.com>
Cc: bug-octave at octave.org
Sent: Tuesday, July 28, 2009 6:07:36 PM
Subject: Re: Cell memory not released

On 28-Jul-2009, Rabeeh Abbasi wrote:

| By looking at the system resources, using "top" command.

OK.  When I run the following (I made the size smaller so that it
would take less time to run)

  x = cell(100000,1);
  for i=1:rows(x) x(i) = sprintf('String %d',i); endfor; 
  clear x; #not all memory is released

I see that the RSS grows to approximately 210m on my system.  After
the clear command, the size of the Octave process does not seem to
shrink.  But running the commands again, it does not grow either.  So
I do think the memory is released (i.e., it is made available to the
system to reuse) but the Octave process does not shrink.  Apparently
you are expecting it to shrink?  I don't think there is any guarantee
that will happen when new/delete are used to manage memory.  So I
don't see a bug here.

jwe



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090729/d530f6db/attachment.html 


More information about the Bug-octave mailing list