GMP 4.2.1 release candidate available

Camm Maguire camm at
Wed Aug 16 16:50:29 CEST 2006

Greetings, and thank you all so much for your marvelous work on this
library!  As you know, GCL relies on it heavily, and hence
maxima, acl2, and axiom in many cases.

After much work, and with the helpful advice of many here, we've made
the interface quite clean.  We wrap all gmp calls to protect them
against the gc, as opposed to the previous practice of maintaining
patches, which is a real bear as we all know.

We use gmp for random numbers.  Latest gmp is giving us some problems
with random states, returned by gmp_randinit_default:

1) the 625 word seed area is allocated with gmp_alloc, but the
   mp_alloc field is not set.  We need this to know how to gc this
   object.  Right now we are using a temporary hack to trap the
   allocated size.

2) A pointer to a static area is returned in _mp_algdata->_mp_lc
   (e.g. &Mersenne_Twister_Generator).  Please make this unstatic,
   i.e. export the struct to the user.  It is very common in these
   programs to dump the running memory image to a file, and restart it
   later.  If gmp is dynamically linked, the load address can be
   different, and aforementioned pointer, stored in the heap, rendered
   invalid.  If the structure was exported, I could refer to it in a
   gcl C file, and rely on ldd to do the relocation.  Alternatively,
   if randseed_mt was non-static, we could do the same for the
   elements of gmp_randfnptr_t as opposed to the body.

Thoughts most welcome -- and thanks again!
Camm Maguire			     			camm at
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

More information about the gmp-devel mailing list