hermann on Mon, 19 Jun 2023 02:41:06 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: void mpz_set_GEN(mpz_ptr z, GEN x) and GEN mpz_get_GEN(mpz_srcptr z) |
On 2023-06-19 02:29, hermann@stamm-wilbrandt.de wrote:
While it works, there is an unmap error on freeing resources. How to fix that?Just compiled on Intel Linux, and there no munmap error happens ... c++$ f=sqrtm1.smallest_known_1million_digit_prime c++$ g++ $f.cc -lgmp -lgmpxx -O3 -o $f -lpari -DPARI c++$ ./sqrtm1.smallest_known_1million_digit_prime a = y^(-1) (mod p) [powm]; a *= x; a %= p 0.253261s [M,V] = halfgcdii(sqrtm1, p) 0.274745s [x,y] = [V[2], M[2,1]] 9.1e-05s done c++$
Sorry, after getting the gist, unmap() error on Intel Linux as well: c++$ f=sqrtm1.smallest_known_1million_digit_prime c++$ g++ $f.cc -lgmp -lgmpxx -O3 -o $f -lpari -DPARI c++$ ./sqrtm1.smallest_known_1million_digit_prime a = y^(-1) (mod p) [powm]; a *= x; a %= p 0.249453s [M,V] = halfgcdii(sqrtm1, p) 0.271674s [x,y] = [V[2], M[2,1]] 0s done munmap_chunk(): invalid pointer Aborted (core dumped) c++$