mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
bignums: don't use ecl_alloc_atomic for gmp
The gmp manual (https://gmplib.org/manual/Custom-Allocation.html) states > GMP may use allocated blocks to hold pointers to other allocated blocks. This will limit the assumptions a conservative garbage collection scheme can make. Thus we can't use ecl_alloc_atomic. We could just use ecl_alloc instead, however our implementation is already structured in such a way that it is sufficient to use ecl_alloc_uncollectable. The reason for that is that currently all bignums except those in the bignum registers in the thread local environment are allocated as compact objects so that we only need to call mpz_clear for the few non-compact objects in the bignum registers. See also commits7b536161andbd48b859. Fixes #485.
This commit is contained in:
parent
f5dfc145d0
commit
c301b108a7
9 changed files with 73 additions and 27 deletions
|
|
@ -148,6 +148,8 @@ typedef unsigned int cl_index;
|
|||
typedef unsigned int cl_hashkey;
|
||||
#endif
|
||||
|
||||
#define ECL_BIGNUM_REGISTER_NUMBER 3
|
||||
|
||||
/*
|
||||
* The character type
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue