[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum
Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers
Fri, 02 Dec 2011 23:17:21 +0100
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)
Andy Wingo <address@hidden> skribis:
> 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?
>>> 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.
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’d say no, because that will fail gracelessly if it gets set or cleared
in the middle of a run, won’t it?
>> Could you check how it affects gc-benchmarks/? :-)
> Are there tests for numbers there?
I think so, but I’m not sure. :-)
(There are some details at