octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #40230] Memory leak in putenv


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #40230] Memory leak in putenv
Date: Thu, 10 Oct 2013 18:02:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130810 Firefox/17.0 Iceweasel/17.0.8

Follow-up Comment #2, bug #40230 (project octave):

I checked in the following changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/7b305b36b87e

It probably doesn't fix the memory leak problem (the memory is still allocated
and stored in the environment and not explicitly deallocated before program
exit) but it should prevent Octave's memory usage from growing without bound
for things like


n = 1024;
x = repmat ("deadbeef", [1, n]);
while (true) putenv ("foo", x); end


However, I did still notice some strange behavior if I ran the above and
attempted to put a very large string (8MB) in the environment.  For example,
after running the code above with N set to 1024*1024, the pager quit working
correctly.  But that appears to happen even when making the putenv call just
once with such a large string...

Rik, I'm not sure whether we should mark this "fixed" or not, but I think we
might as well close the report.  If you agree, please close it. 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40230>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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