GMP terminates when out of memory

Roberto Bagnara bagnara at
Sun Dec 28 17:48:53 CET 2008

Bjarke Roune wrote:
> On Sun, Dec 28, 2008 at 10:44 AM, Roberto Bagnara <bagnara at> wrote:
>> Yes, we have one test in our testsuite that simulates virtual memory
>> exhaustions and running it with valgrind does not reveal any memory
>> leak.  In addition, we have used for years this facility in our
>> program analyzers and we never detected a state violation.
> It sounds like you make memory unavailable and then call a GMP
> algorithm to test it. This would make GMP fail at the first allocation
> it attempts.


> Have you done something to make the first few GMP
> allocations succeed, and only then make them fail?

Yes, this is precisely how the test works.


Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
mailto:bagnara at

More information about the gmp-discuss mailing list