GMP 6 the incomatible GMP?

Marc Glisse marc.glisse at
Tue Jan 8 07:46:43 CET 2013

On Tue, 8 Jan 2013, Niels Möller wrote:

> Torbjorn Granlund <tg at> writes:
>> The idea is to instead make a 64-bit bitfield of the _mp_size and
>> _mp_alloc fields.  One would give _mp_size about 48 bits, and _mp_alloc
>> the remaining 16.  The alloc field would lose granularity, but should
>> code small sizes exactly.
> Hmm. I guess one could go down to only 8 bits or so for the alloc field,
> and for larger allocations, store the number of allocated limbs at the
> head of the limb array (in the case limb size is not artificially small,
> it could be just _mp_d[-1]).

Then we might as well always put it in _mp_d[-1], no? IIRC that's what 
mpfr does.

Marc Glisse

More information about the gmp-devel mailing list