Additional memory handler features.

Niels Möller nisse at
Sat Jan 3 20:56:37 UTC 2015

tg at (Torbjörn Granlund) writes (replying to David Warme, not

> You insist on discussing on a quite abstract level, ignoring Niels'
> requests for a bit of concreteness.

Honestly, I don't fully understand why we have the customizable
allocation at all. I'm aware of only one real usecase, and that's hooks
into certain types of garbage collectors. And then there's some
*potential* to use them to implement better recovery on allocation
failure, as has been discussed recently, but no one is doing that for
real as far as I know.

> If this in your opinion breaks the "do one thing, and do it well" rule,
> then you won't like any software, not even hello world since stdio will
> allocate a buffer during the output process.

To make it possible to really stay in full control of allocation with
GMP, another option is to push forward with the itch/scratch-ifying of
the mpn functions, and then stick to using mpn.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list