From bug-octave-request at bevo dot che dot wisc dot edu Fri Mar 26 12:43:09 1999 Subject: memory leaking in octave 2.1.7/2.1.13 From: "John W. Eaton" To: ajc at inescn dot pt cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 26 Mar 1999 12:42:51 -0600 (CST) On 26-Mar-1999, Artur Jorge Azevedo Carvalho wrote: | 1 - Memory allocated by script files isn't deallocated by octave , | when | the script execution ends, only when we do a clear , is | then deallocated. This memory is only allocated the first time the | function is called, the second time the same function is called new | memory is allocated but when it returns to the command prompt this new | memory is released, except for the memory allocated the first time the | function was called. Sorry, I don't follow this statement. | in the following examples each array allocated consumes aproximatly 8Mb | | Bug 1: | at line prompt: # octave - 3400Kb | at octave prompt: | | function y=t(a);a(1,1)=0;y=a;end - 3476Kb | a=rand(1000); - 11336Kb | t(a); - 19172Kb | clear a; - 11336Kb | clear t; - 3404Kb I also don't understand why this small change in memory use is a leak, or due to calling the function. There are lots of other things going on that could cause a small growth in the memory use. For example, the commands you type are being stored in the history list. To demonstrate that there is a leak, can you please give me a sequence of commands like while (1) commands that cause Octave to grow without bound ... endwhile that will allow me to reproduce the problem? Thanks, jwe