unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludovic.courtes@laas.fr (Ludovic Courtès)
Subject: [PATCH] Removed a useless GC invocation
Date: Fri, 16 Dec 2005 18:14:17 +0100	[thread overview]
Message-ID: <87lkylotg6.fsf@laas.fr> (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


             reply	other threads:[~2005-12-16 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16 17:14 Ludovic Courtès [this message]
2005-12-29 10:24 ` [PATCH] Removed a useless GC invocation Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lkylotg6.fsf@laas.fr \
    --to=ludovic.courtes@laas.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).