diff options
| author | J08nY | 2017-04-05 16:27:02 +0200 |
|---|---|---|
| committer | J08nY | 2017-04-05 16:27:02 +0200 |
| commit | 9718963a643f0ae15120ceea2d26899892ab1ed4 (patch) | |
| tree | 0987ce122d298d60aa7d637b84583ce42abf6658 /src/math/random.c | |
| parent | 605049a142aff150d36711c66935c80875e84e36 (diff) | |
| download | ecgen-9718963a643f0ae15120ceea2d26899892ab1ed4.tar.gz ecgen-9718963a643f0ae15120ceea2d26899892ab1ed4.tar.zst ecgen-9718963a643f0ae15120ceea2d26899892ab1ed4.zip | |
Fix some leaks, add option to specify PARI stack size
Diffstat (limited to 'src/math/random.c')
| -rw-r--r-- | src/math/random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/random.c b/src/math/random.c index a1d88ab..20098e1 100644 --- a/src/math/random.c +++ b/src/math/random.c @@ -47,7 +47,7 @@ GEN random_prime(long bits) { pari_sp btop = avma; do { p = randomprime(range); - if (gc_needed(btop, 1)) p = gerepilecopy(btop, p); + p = gerepileupto(btop, p); } while (!isprime(p)); } |
