On Tue, 15 Mar 2011, Theo Schlossnagle wrote: > I call mpz_n_pow_ui. Libgmp performs an allocation directly using > mpz_realloc instead of the reallocation function I set. Did you look at the code of mpz_realloc? It is a simple wrapper around... your reallocation function. -- Marc Glisse