allocation functions
Kevin Ryde
user42@zip.com.au
Thu, 19 Dec 2002 08:25:46 +1000
Torbjorn Granlund <tege@swox.com> writes:
>
> A good idea. Perhaps add that to tasks.html?
I was about to actually do it! :)
I was hoping for feedback though from C++ experts on get_str versus
mpz_get_str for the name of the new function gmpxx.h will use. But
I'm strongly leaning towards mpz_get_str I think, to match the C
function and for maximum cleanliness in gmp.h.
(This isn't going to be documented, not initially, but the name will
get into application binaries, so it matters.)
> OK, so let's a that!
How about something basic like the following, taking pointers to
fun-pointers for each of the routines. Passing NULL would be allowed
for each, in which case you don't that one back.
void
mp_get_memory_functions (void *(**alloc_func) (size_t),
void *(**realloc_func) (void *, size_t, size_t),
void (**free_func) (void *, size_t));