Cell memory not released

John W. Eaton jwe at octave.org
Tue Jul 28 11:07:36 CDT 2009


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


More information about the Bug-octave mailing list