Reduced number of allocated limbs after calling mpz_remove
Albin Ahlbäck
albin.ahlback at gmail.com
Mon May 20 17:33:03 CEST 2024
On 5/20/24 4:40 PM, Niels Möller wrote:> Could you use mpz_limbs_write
(x, 2) for the functions that want a
> result area of at least two limbs? Added in gmp-6-0.0. There's also the
> mpz_realloc2 function, which does something related, but which may also
> shrink the allocation.
We do utilize the internal function mpz_realloc for almost everything as
we mostly work with limbs instead of bits.
Just to note, we have "patched" every call to mpz_remove so that the
returning mpz does not have less limbs than we require.
Best,
Albin
P.S. Looks like my previous email didn't make it to the list.
More information about the gmp-bugs
mailing list