From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers Date: Fri, 02 Dec 2011 19:12:29 +0100 Message-ID: <87vcpy7she.fsf@pobox.com> References: <87tycaodlk.fsf@netris.org> <87k4d6edvr.fsf@gnu.org> <8739jue9wk.fsf@neil-laptop.ossau.uklinux.net> <87zkfh9x8r.fsf@pobox.com> <8762i5mf4x.fsf@gnu.org> <874nxj8c00.fsf@pobox.com> <877h2enbzk.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322849570 13242 80.91.229.12 (2 Dec 2011 18:12:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2011 18:12:50 +0000 (UTC) Cc: Neil Jerram , guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 02 19:12:45 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RWXbG-0003JQ-4u for guile-devel@m.gmane.org; Fri, 02 Dec 2011 19:12:42 +0100 Original-Received: from localhost ([::1]:37991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWXbF-0005t9-K5 for guile-devel@m.gmane.org; Fri, 02 Dec 2011 13:12:41 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWXbA-0005sL-Rj for guile-devel@gnu.org; Fri, 02 Dec 2011 13:12:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWXb9-0007xS-1E for guile-devel@gnu.org; Fri, 02 Dec 2011 13:12:36 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:47640 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWXb8-0007x6-Ux; Fri, 02 Dec 2011 13:12:34 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 16DA57818; Fri, 2 Dec 2011 13:12:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=lIKQR9sqPsGq Zto9azMniQfyX9k=; b=PB9bgt3tIiO4j80oRaM7M5jTvrg/g2ReGOxvJIDq6jdM PiSmbeT+daQbttfdW0si2BXuq3xGOHJTvNeWLCWo4ZDNeQQbyFPL2Cz1QkNIwHdx DHAGe7lkzF5Apyd9QURvUn69qx+Nj4I8TBzabhXvzZh/A6Iq19Jwuw+kekCeMjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=paI3zj fqZUDyfVANdJ7fLz5pHaqSNbXKOKgxS7DnwipN/j5gZ55LiCvEunSfffdxI3UyES MynU+qOD1GfClbZ2OD91PlnZKlxzEe+xN7oppkX3dNuweQncZPdApLFSg9wibVS+ bVs39oaQxVzhmH0kii+wAGvjaGCdI7iaZThyU= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 0FEF97817; Fri, 2 Dec 2011 13:12:33 -0500 (EST) Original-Received: from badger (unknown [91.117.99.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 853777816; Fri, 2 Dec 2011 13:12:32 -0500 (EST) In-Reply-To: <877h2enbzk.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 02 Dec 2011 18:02:07 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 344B79BE-1D11-11E1-B6C7-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12953 Archived-At: Heya, On Fri 02 Dec 2011 18:02, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > I guess scm_gc_register_collectable_memory could be > changed to just call it, ignoring its first argument? Done. >> I made scm_realloc call scm_gc_register_allocation. I also installed >> custom gmp allocators that call scm_malloc and friends > > I was about to say =E2=80=9Cwe can=E2=80=99t do that in 2.0!=E2=80=9D, bu= t then saw your > scm_install_gmp_memory_functions trick. Cool! :-) Did you also see that we used to^H^H still `free' the memory returned from mpz_get_str? That means that in practice, since the 1.8 days we did not support other allocators for mp_memory_functions. For that reason I defaulted scm_install_gmp_memory_functions to 1. I will fix the other instance of scm_take_locale_string. > Could you make it SCM_INTERNAL instead of SCM_API? Sure, but you don't want to allow users to set it? > Could you check how it affects gc-benchmarks/? :-) Are there tests for numbers there? This change would only affect that, I think. Cheers, Andy --=20 http://wingolog.org/