guile-devel
[Top][All Lists]
Advanced

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

[PATCH] Removed a useless GC invocation


From: Ludovic Courtès
Subject: [PATCH] Removed a useless GC invocation
Date: Fri, 16 Dec 2005 18:14:17 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

In `next_fluid_num ()', an `scm_gc ()' call was systematically triggered
at startup time.  This patch fixes this.

Thanks,
Ludovic.


2005-12-16  Ludovic Courtès  <address@hidden>

        * fluids.c (next_fluid_num): Don't trigger the GC when
        ALLOCATED_FLUIDS_LEN is zero.


--- orig/libguile/fluids.c
+++ mod/libguile/fluids.c
@@ -202,7 +202,8 @@
   scm_frame_begin (0);
   scm_i_frame_pthread_mutex_lock (&fluid_admin_mutex);
 
-  if (allocated_fluids_num == allocated_fluids_len)
+  if ((allocated_fluids_len > 0) &&
+      (allocated_fluids_num == allocated_fluids_len))
     {
       /* All fluid numbers are in use.  Run a GC to try to free some
         up.




reply via email to

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