[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum
From: |
Andy Wingo |
Subject: |
Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers |
Date: |
Fri, 02 Dec 2011 19:12:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Heya,
On Fri 02 Dec 2011 18:02, address@hidden (Ludovic Courtès) 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 “we can’t do that in 2.0!”, but 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
--
http://wingolog.org/