From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers Date: Fri, 02 Dec 2011 23:17:21 +0100 Message-ID: <87y5uuboum.fsf@gnu.org> 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> <87vcpy7she.fsf@pobox.com> 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 1322864261 23513 80.91.229.12 (2 Dec 2011 22:17:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2011 22:17:41 +0000 (UTC) Cc: Neil Jerram , guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 02 23:17:36 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 1RWbQF-0005Rz-Ci for guile-devel@m.gmane.org; Fri, 02 Dec 2011 23:17:35 +0100 Original-Received: from localhost ([::1]:57270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWbQE-0001oB-Iw for guile-devel@m.gmane.org; Fri, 02 Dec 2011 17:17:34 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWbQB-0001mU-DQ for guile-devel@gnu.org; Fri, 02 Dec 2011 17:17:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWbQA-0004ke-8G for guile-devel@gnu.org; Fri, 02 Dec 2011 17:17:31 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:38872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWbQA-0004kZ-2M for guile-devel@gnu.org; Fri, 02 Dec 2011 17:17:30 -0500 X-IronPort-AV: E=Sophos;i="4.71,286,1320620400"; d="scan'208";a="133757697" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 02 Dec 2011 23:17:27 +0100 In-Reply-To: <87vcpy7she.fsf@pobox.com> (Andy Wingo's message of "Fri, 02 Dec 2011 19:12:29 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Frimaire an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.82 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:12954 Archived-At: Hello! Andy Wingo skribis: > 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. Thanks! >>> 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, b= ut 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. Oh, OK. > For that reason I defaulted scm_install_gmp_memory_functions to 1. Yes, makes sense. >> Could you make it SCM_INTERNAL instead of SCM_API? > > Sure, but you don't want to allow users to set it? I=E2=80=99d say no, because that will fail gracelessly if it gets set or cl= eared in the middle of a run, won=E2=80=99t it? >> Could you check how it affects gc-benchmarks/? :-) > > Are there tests for numbers there? I think so, but I=E2=80=99m not sure. :-) (There are some details at .) Thanks, Ludo=E2=80=99.