From bug-octave-request at che dot utexas dot edu Fri Dec 17 12:22:02 1993 Subject: octave-0.79 memory leak From: kircher at neuro dot tuwien dot ac dot at To: bug-octave at che dot utexas dot edu Cc: zorman at neuro dot tuwien dot ac dot at (Werner Zorman) Date: Fri, 17 Dec 1993 19:21:10 +0100 (MET) Hello, we apparently found a memory leak in octave-0.79. It manifests itself on iterated function calls. This is the minimal setup to produce the effect: Consider the following file dummy.m: function dummy end After starting octave, ps gives the following: USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND gk 7827 1.0 3.8 2362 584 pp2 S 21:57 0:00 octave now we execute octave:1> for j=1:10000 dummy; end after that ps gives USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND gk 7827 47.4 15.2 4022 2292 pp2 S 21:58 1:54 octave once again octave:2> for j=1:10000 dummy; end USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND gk 7827 48.0 26.1 5662 3932 pp2 S 21:57 3:48 octave When we use built-in functions instead of m-files the effect is weaker. In a similar session with dummy; substituted by sin(0); the three ouputs of ps are USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND gk 7878 8.8 3.8 2362 584 pp2 S 22:08 0:00 octave gk 7878 39.7 6.1 2674 928 pp2 S 22:08 0:11 octave gk 7878 44.1 8.2 2986 1240 pp2 S 22:08 0:23 octave I am sorry for not having really tracked the problem down, but I think you will be able to locate the error very much faster than we are... Sincerely Gerhard Kircher