From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Removed a useless GC invocation Date: Fri, 16 Dec 2005 18:14:17 +0100 Organization: LAAS-CNRS Message-ID: <87lkylotg6.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1134765707 918 80.91.229.2 (16 Dec 2005 20:41:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2005 20:41:47 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 16 21:41:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EnMM8-0003e4-QQ for guile-devel@m.gmane.org; Fri, 16 Dec 2005 21:39:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnMMq-0000my-Sa for guile-devel@m.gmane.org; Fri, 16 Dec 2005 15:39:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EnJBO-0004kh-Tu for guile-devel@gnu.org; Fri, 16 Dec 2005 12:15:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EnJBJ-0004k4-D7 for guile-devel@gnu.org; Fri, 16 Dec 2005 12:15:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnJBI-0004jv-Gm for guile-devel@gnu.org; Fri, 16 Dec 2005 12:15:44 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EnJDj-0003cJ-Td for guile-devel@gnu.org; Fri, 16 Dec 2005 12:18:16 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id jBGHEvuG020539; Fri, 16 Dec 2005 18:14:58 +0100 (CET) Original-To: guile-devel@gnu.org X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 26 Frimaire an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: guile-devel@gnu.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-MIME-Autoconverted: from 8bit to quoted-printable by laas.laas.fr id jBGHEvuG020539 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5535 Archived-At: 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=E8s * 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); =20 - if (allocated_fluids_num =3D=3D allocated_fluids_len) + if ((allocated_fluids_len > 0) && + (allocated_fluids_num =3D=3D 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