unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Removed a useless GC invocation
@ 2005-12-16 17:14 Ludovic Courtès
  2005-12-29 10:24 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2005-12-16 17:14 UTC (permalink / raw)


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  <ludovic.courtes@laas.fr>

	* 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.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Removed a useless GC invocation
  2005-12-16 17:14 [PATCH] Removed a useless GC invocation Ludovic Courtès
@ 2005-12-29 10:24 ` Neil Jerram
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Jerram @ 2005-12-29 10:24 UTC (permalink / raw)


ludovic.courtes@laas.fr (Ludovic Courtès) writes:

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

Looks good to me.  Applied, thanks.

      Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-29 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-16 17:14 [PATCH] Removed a useless GC invocation Ludovic Courtès
2005-12-29 10:24 ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).