Patch to allow more granular aborting.
Torbjorn Granlund
tg at gmplib.org
Tue Mar 15 11:32:35 CET 2011
Theo Schlossnagle <jesus at omniti.com> writes:
I'm confused now. In a previous mail, you suggested I use the builtin
libgmp mechanism to replace the allocators. It appears libgmp indeed
has replaceable allocators, but then when it goes to allocate they are
not used. I results in I me being unable to wrap realloc and throw and
exception on NULL return.
GMP only allocates (reallocates) things when memory (more memory) is
needed, as Niels pointed out.
If you want allocation (reallocation) using the replaceable allocators
to take place also when memory is not needed, then you probably need to
maintain your custom GMP version.
Your statement that "when [GMP] goes to allocate [the custom allocators]
are not used" is simply a misunderstanding of GMP source code.
--
Torbjörn
More information about the gmp-devel
mailing list