octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding Octave's memory use breakdown


From: Marco Atzeri
Subject: Re: Finding Octave's memory use breakdown
Date: Tue, 26 Apr 2016 09:24:32 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 26/04/2016 07:46, Daniel J Sebald wrote:
On 04/25/2016 11:31 PM, LachlanA wrote:
John W. Eaton wrote
On 04/24/2016 11:42 PM, LachlanA wrote:

Is there a way to find out where Octave is using memory?  I often find
that
Octave is using say 2GB, but "whos" shows only a few hundred
megabytes in
variables.


I don't have the GUI built on my system, so in octave-cli I've done:

x = rand(1,174126036);

and memory jumps to 1.3 GiB.  Then

clear all

and memory goes back down to 9.6 MiB, which is where it started out.

You are thinking that somehow the act of parsing code is consuming
memory?  A possible memory leak?  As I see it, parsing should be a
temporary consumption of memory, that eventually gets cleaned up with
successive returns to the command line (i.e., end of processing).

Can we come up with a script to compare across systems?  Something
simple that illustrates what seems strange to you?  For example, I'd
think that "plot" parses a lot of code, so I've done:

for i=1:20
  figure(i);
  plot(1:5000);
end
close all

and the memory goes from 9.6 MB to 21.1 MB and doesn't come back down
with the close all, and whos shows but a single variable.  It might be
that the extra overhead is internal properties for the figures still
hanging around.  In fact, running the above script again still results
in 21.1 MB, so how about changing to:

for i=21:40
  figure(i);
  plot(1:5000);
end
close all

Nope, still stays at 21.1 MB without increasing, so I doubt that theory
(internal figure properties) is true.  Maybe it is parse tree, or maybe
a leak, don't know.  But in that regard Rik and John have been working
on memory leaks as of late so it would have to be the most recent
version of code to work from.

Dan




try "clf reset" to clean the graphic structure.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]