Internal Memory allocation?

Marc Glisse marc.glisse at inria.fr
Tue Jun 30 18:45:19 UTC 2020


On Tue, 30 Jun 2020, Simon Hafner wrote:

> Hello GMP
>
> I'm interested in the internal memory allocation of a few mpn functions, namely
>
> c_mpn_add, c_mpn_sub, c_mpn_mul, c_mpn_tdiv_qr, c_mpn_divrem_1, c_mpn_mod_1
>
> Do any of these functions allocate additional memory which is not seen
> by the structures passed in? According to a small grep, I can't see
> any, but I'm not well-versed in asm/C.

I strongly doubt that add/sub would allocate, but for the rest:

$ grep -i alloc mpn/generic/mul.c
... 8 allocations ...

and that's without counting the functions from other files that are 
called.

-- 
Marc Glisse


More information about the gmp-discuss mailing list