This thread is too long already, but I think it may not be dedundant
to point how how I wrote a linkage between Allegro Common Lisp and
GMP, and how (I suspect) most mature Lisp systems with a deterministic
garbage collector would do it.
Let GMP do its own memory allocation.  After Lisp has itself allocated
a structure S with a pointer to a GMP-allocated object, it knows what
to do: either S is
used or not, determined by a garbage collection.   When S is
determined to be not used, mpz_clear  or whatever, is called. This
actually may not happen at the next garbage collection, but at the one
after.

A complete Allegro coding of this is online in my generic lisp
arithmetic package.

RJF

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to