mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-15 15:21:03 -08:00
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:
parent
1b0ffbe6cc
commit
7b5361613b
1 changed files with 2 additions and 2 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue