Update of /cvsroot/audacity/lib-src/libnyquist/nyquist/xlisp
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4180/lib-src/libnyquist/nyquist/xlisp

Modified Files:
        xldmem.c 
Log Message:
Correct (rare, but possible) bug when garbage collection doesn't free up 
sufficient nodes to run the gc-hook.

Index: xldmem.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/libnyquist/nyquist/xlisp/xldmem.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xldmem.c    29 Jan 2009 18:04:26 -0000      1.1
+++ xldmem.c    24 Feb 2009 05:30:43 -0000      1.2
@@ -299,8 +299,6 @@
 LOCAL void findmem(void)
 {
     gc();
-    if (nfree < (long)anodes)
-        addseg();
 }
 
 /* gc - garbage collect (only called here and in xlimage.c) */
@@ -346,6 +344,10 @@
     /* count the gc call */
     ++gccalls;
 
+    /* add a new segment if still no free nodes */
+    if (nfree < (long)anodes)
+        addseg();
+
     /* call the *gc-hook* if necessary */
     if (s_gchook && (fun = getvalue(s_gchook))) {
         newfp = xlsp;


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to