From bug-request at octave dot org Tue Jan 18 14:33:51 2005 Subject: Serious memory leak in octave (this may be a duplicate bug report) From: "John W. Eaton" To: Dan Nessett Cc: Date: Tue, 18 Jan 2005 15:37:05 -0500 On 14-Jan-2005, Dan Nessett wrote: | This may be a duplicate bug report. I got tangled up in emacs using | bug=5Freport and I don=81=1B,A9=1B(Bt know if it sent the email. |=20 | When I attempt to display a vector of 800,000 elements, octave starts= | gobbling up virtual memory. The sequence of commands is: |=20 | p=3Dlinspace(1,80000,800000)=81=1B,A9=1B(B; | p |=20 | This is a test sequence. I discovered the bug when using plot() to pl= ot two | 800,000 vectors against each other. |=20 | As you can see from the printout of =81=1B,A3=1B(Btop=81=1B,A2=1B(B b= elow, octave consumes about 19 | 1/2 minutes of cpu time processing this set of commands and its virtu= al | space grows to 2.53 Gbytes. The printout from top is just after octav= e | finishes the second command. This is on a 1.42GHz dual-processor G4 M= ac with | 1 Gbytes of memory running Mac OS X 10.2. |=20 | PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE= VSIZE | 395 iTerm 7.9% 1:03.22 7 125 154 3.21M 2.66M+ 4.18M= + | 120M+ | 494 octave-2.1 3.8% 19:41.52 1 11 9965 884M+ 3.18M+ 127M= - | 2.53G+ | 393 iTunes 2.3% 0:47.53 9 172 233 1.23M 1.11M- 2.26M= 146M | 0 kernel=5Ftas 2.2% 0:23.52 27 0 - - - 61.= 5M- | 643M- | 356 Window Man 1.3% 0:34.73 3 241 605 2.91M+ 14.3M- 14.4M= - | 193M+ | 517 top 0.9% 0:08.80 1 14 18 192K 248K 432K= 13.6M | 388 IomegaDriv 0.1% 0:01.73 1 22 32 36K 228K 256K= 14.2M | 504 Project Bu 0.0% 0:14.34 2 96 252 1.07M 2.75M- 3.77M= 121M | 391 TruBlueEnv 0.0% 0:13.85 15 182 204 1.15M 708K 448K= 1.10G | 519 Safari 0.0% 0:06.40 5 112 234 4.36M- 1.04M- 5.17M= - 163M | 180 ATSServer 0.0% 0:03.66 2 37 208 300K 968K 684K= 72.8M | 51 kextd 0.0% 0:01.15 2 18 23 0K 216K 56K= 15.3M | 384 Dock 0.0% 0:01.81 2 89 164 68K 5.68M+ 5.64M= 110M | 317 automount 0.0% 0:00.01 2 22 21 0K 216K 180K= 14.7M | 1 init 0.0% 0:00.00 1 9 12 0K 216K 152K= 1.28M |=20 |=20 | This bug appeared after I used the August2003 updater from Apple to m= ove to | gcc 3.3. I use fink to load open source software on my Mac. When I st= arted | having problems with octave after resynching fink, I blew away /sw an= d | reloaded and rebuilt fink and all my other software from scratch. Thi= s did | not fix the problem. |=20 | I=81=1B,A9=1B(Bm not a Mac OS X/Darwin/NetBSD expert, but it appears = that octave is | grabbing swap space and not releasing it. This is a classic symptom o= f a | memory leak. If I run two copies of octave and execute the same seque= nce of | commands, my Mac comes to its knees. The Finder goes out to lunch and= I have | to force reboot the system with the power switch. I can't reproduce this with the current testing (aka, recommended) version of Octave (2.1.64) on a Debian system. | IMAGEPATH =3D ".:/sw/share/octave/2.1.46/imagelib//" This was the only place in your message where could get a clue about the version of Octave you are using. Is it really 2.1.46=3F If so, that is quite old. jwe ------------------------------------------------------------- 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 -------------------------------------------------------------