Re: mini-gmp: mpz_congruent_p and mpz_probab_prime_p

2014-03-06 Thread Niels Möller
bodr...@mail.dm.unipi.it writes: I agree with your analysis: with the suggested change the same answer is given. Earlier, at no extra cost, I say. The same comment applies to the current implementation in the main library. I think there's some value in using precisely the same tests as in

Memory allocation hints

2014-03-06 Thread David Warme
I am posting this to gmp-devel (instead of gmp-discuss) because it concerns very arcane GMP implementation details. GMP's trio (alloc, realloc, free) of memory allocation functions, while simple, tends to rule out more sophisticated, fine-grained memory heap optimizations. For example, when no

longjmp()

2014-03-06 Thread David Warme
I am posting this to gmp-devel (instead of gmp-discuss) because it concerns very arcane GMP implementation details. The GMP manual on Custom Allocation contains the following paragraph: There's currently no defined way for the allocation functions to recover from an error such

allocated blocks holding pointers to other allocated blocks

2014-03-06 Thread David Warme
I am posting this to gmp-devel (instead of gmp-discuss) because it concerns very arcane GMP implementation details. The GMP manual on Custom Allocation contains the following paragraph: GMP may use allocated blocks to hold pointers to other allocated blocks. This will limit

Re: longjmp()

2014-03-06 Thread Niels Möller
David Warme da...@warme.net writes: I am posting this to gmp-devel (instead of gmp-discuss) because it concerns very arcane GMP implementation details. Another possibility is that blocks allocated using the TMP_DECL, TMP_MARK, and TMP_FREE mechanisms (if too large for alloca()) would not

Re: allocated blocks holding pointers to other allocated blocks

2014-03-06 Thread Niels Möller
David Warme da...@warme.net writes: The GMP manual on Custom Allocation contains the following paragraph: GMP may use allocated blocks to hold pointers to other allocated blocks. This will limit the assumptions a conservative garbage collection scheme can make.

Re: allocated blocks holding pointers to other allocated blocks

2014-03-06 Thread Marc Glisse
On Wed, 5 Mar 2014, David Warme wrote: The GMP manual on Custom Allocation contains the following paragraph: GMP may use allocated blocks to hold pointers to other allocated blocks. This will limit the assumptions a conservative garbage collection scheme can make.