From bug-request at octave dot org Mon Jan 24 18:17:25 2005 Subject: Re: Serious memory leak in octave (this may be a duplicate bug report) From: Dan Nessett To: Per Persson CC: Martin Costabel , Date: Mon, 24 Jan 2005 17:43:45 -0600 Looks like the culprit is libncurses in /sw/lib. To document this workaround for the record, here is the configure line I used. ./configure --enable-shared --enable-dl --disable-static --disable-readline --without-hdf5 FLIBS=/sw/lib/libg2c.a Here is the output of otool: [/sw-nonfink/octave-2.1.64] otool -L /usr/local/bin/octave /usr/local/bin/octave: /usr/local/lib/octave-2.1.64/liboctinterp.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/octave-2.1.64/liboctave.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/octave-2.1.64/libcruft.dylib (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib (compatibility version 1.0.0, current version 138.1.0) /usr/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0) With this configuration, the two commands take about 4-5 seconds of CPU time and VSIZE grows to 234M and stays there. Now, I will try to get readline and hdf5 back into the build by explicitly providing /usr/lib/libncurses.5.dylib in the configure line and removing the disable/without options. Thanks for the help. Dan On 1/23/05 2:47 PM, "Per Persson" wrote: > > On Jan 23, 2005, at 00:22, Dan Nessett wrote: > >> Below is the output of otool on octave. It appears octave has pulled in >> libreadline, libncurses, and libhdf5 from /sw/lib. I can get rid of the >> first and last with configure options. However, the only place I found >> libncurses was also in /sw/lib. I presume vecLib in /System/... is >> required. >> Also I presume libz and libSystem.B are required. If not, let me know. >> > > The only thing left is libncurses. On OS X 10.3 libncurses lives in > /usr/lib, but it used to be part of libSystem in 10.2. I don't know why > fink has their own version, maybe Martin knows? > > If you leave out the -I/sw/include -L/sw/lib flags and explictly add > /sw/lib/libg2c.a instead of -lg2c, will that build an executable > without libncurses from fink? If so, still same problem? > > /Per > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------