octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak with octave cygwin DLD calls


From: John W. Eaton
Subject: Re: Memory leak with octave cygwin DLD calls
Date: Wed, 27 Apr 2005 03:57:11 -0400

On 27-Apr-2005, Dmitri A. Sergatskov <address@hidden> wrote:

| John W. Eaton wrote:
| > On 26-Apr-2005, Dmitri A. Sergatskov <address@hidden> wrote:
| > 
| > | Memory leaks are tough to debug. We have this "MacKay leak"[*] for a 
while,
| > | and no valgrind can help much so far ... :(
| > | 
| > | [*]  
http://www.octave.org/octave-lists/archive/bug-octave.2004/msg00352.html
| > 
| > For this problem, does the following patch help?  It seems to solve
| > the problem for me (which I am now able to reproduce).
| > 
| 
| No :(
| 
| On 2.66 P4 I loose 13Meg/minute...

OK, how about this in addition to the previous change?

I think both are needed.  Earlier, I simplified the example and fixed
one leak, then stupidly did not test again with the original problem.
Oops.  With this change added in, I don't see a leak for the original
problem either.  Here's hoping you won't either...

Thanks,

jwe


src/ChangeLog:

2005-04-27  John W. Eaton  <address@hidden>
 
        * parse.y: (parse_and_execute (FILE *)):
        Also save and restore global_command.
 

Index: src/parse.y
===================================================================
RCS file: /usr/local/cvsroot/octave/src/parse.y,v
retrieving revision 1.224.2.9
diff -u -r1.224.2.9 parse.y
--- src/parse.y 27 Apr 2005 05:07:58 -0000      1.224.2.9
+++ src/parse.y 27 Apr 2005 07:53:06 -0000
@@ -3100,6 +3100,8 @@
 {
   unwind_protect::begin_frame ("parse_and_execute");
 
+  unwind_protect_ptr (global_command);
+
   YY_BUFFER_STATE old_buf = current_buffer ();
   YY_BUFFER_STATE new_buf = create_buffer (f);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]