_mp_alloc to long int

Hans Åberg haberg-1 at telia.com
Thu Sep 29 14:25:22 CEST 2022


> On 30 Jul 2022, at 12:24, Thorbear Sprucegrove <tg at gmplib.org> wrote:
> 
> Brett Kuntz <kuntz at shaw.ca> writes:
> 
>  #include <stdint.h> 
>  ... 
>  int64_t _mp_alloc; 
>  int64_t _mp_size; 
> 
> Or plain "long" perhaps as that would only affect 64-bit machines.

At least in C++, there may be no memory savings with smaller ints due to alignment requirements. In GCC 12 (MacOS 12), __STDCPP_DEFAULT_NEW_ALIGNMENT__ is 16, meaning that operator new will allocate multiples of 16 bytes.




More information about the gmp-discuss mailing list