From maintainers-request at octave dot org Tue Apr 26 15:05:15 2005 Subject: Memory leak with octave cygwin DLD calls From: "John W. Eaton" To: Andy Adler Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Tue, 26 Apr 2005 16:03:40 -0400 On 23-Apr-2005, Andy Adler wrote: | I've been trying to debug a memory leak problem with | cyginw octave. It's been there since at least 2.1.60 and | is still in 2.9.2. I've now simplified it to this: | | Using a simple DLD function like | $ cat zno.cpp | #include | | DEFUN_DLD (zno, args, , " " ) { | octave_value retval= 0.0; | return retval; | } | | call octave like this | | echo 'for i=1:1e8; x=zno ;end' | octave -qfH | | and watch the process monitor size for octave climb. | I calculate about 16 bytes leak per function call. | | This also happens with builtin functions | | echo 'for i=1:1e8; x=sort(1) ;end' | octave -qfH | | If octave is compiled statically, there is no memory | leak. | | I'm not sure where to look to debug this. I don't see the leak on a Debian system, so I'd guess that it is something in a system library or (perhaps less likely) the code generated by GCC on the Cygwin system. I'm not sure precisely how to debug it either. Can you run something like valgrind to give some clues? jwe