Interruptible calculations

Vincent Lefevre vincent at
Tue Apr 14 19:29:07 CEST 2009

On 2009-04-15 01:11:38 +0800, Jafet wrote:
> I would like it to be human-friendly and especially allow a keyboard
> interrupt to quit a calculation and return to the prompt. However, if a
> GMP function is executing at the moment I would want to force it to stop
> and quit cleanly when the program gets a SIGINT.

IMHO the main problem is to avoid memory leaks. But this can probably
be done by defining your own memory allocation routines (to keep a
trace of every allocation).

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

More information about the gmp-discuss mailing list