Thu 10 Oct 2013 06:36:42 PM UTC, comment #3:
For the record, this remaining strange behavior is probably due to exec() failing in a documented way because of the size of the environment. Octave could attempt to put a cap on the total size of the environment, but I'd call that one out of scope.
For comparison, here's a bash command line that gives the error that you're probably seeing with the pager:
|
Thu 10 Oct 2013 06:02:01 PM UTC, comment #2:
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
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.
|
Thu 10 Oct 2013 02:48:08 AM UTC, original submission:
The following Octave code:
produces the following leak report. I've verified that the loss is always the C-terminated strings "VAR" and "VAL" which are the inputs to putenv. When it is not a trivial example, such as when EXEC_PATH is set, the loss is more like 700 bytes.
|