fix memory leak with bignums

Letting the gmp library use uncollectable allocations leads to
    leaks, if the bignums are not freed with mpz_clear. Since this
    can't be done without a finalizer, we have to use the standard
    allocation mechanism. Fixes #433.
This commit is contained in:
Marius Gerbershagen 2018-03-26 21:51:41 +02:00
parent 1b0ffbe6cc
commit 7b5361613b

View file

@ -273,13 +273,13 @@ _ecl_fix_divided_by_big(cl_fixnum x, cl_object y)
static void *
mp_alloc(size_t size)
{
return ecl_alloc_uncollectable(size);
return ecl_alloc_atomic(size);
}
static void
mp_free(void *ptr, size_t size)
{
ecl_free_uncollectable(ptr);
ecl_dealloc(ptr);
}
static void *