Minh Nguyen <md6nguyen@yahoo.com> writes: > > The document states that the custom functions will be used for all > memory allocation done by GMP. That's what happens. Make sure you call mp_set_memory_functions before any mpz_init though. If you think you've hit a bug, make a report to bug-gmp with a full failing program.