
Hi Roberto,
On Monday 08 October 2007 11:57, Roberto Bagnara wrote:
Jan Wielemaker wrote:
On Tuesday 02 October 2007 10:25, Roberto Bagnara wrote:
Perhaps I am missing something, but this will break the overall application completely. I think SWI-Prolog should have his own private version of GMP if it wants to change the allocation functions.
Thats not possible, at least not using ELF binaries as in Linux. Unless you make a copy of the GMP sources and rename all global identifiers.
It can be done without copying the sources: see
http://www.cs.unipr.it/pipermail/ppl-devel/2007-October/011244.html
You're free to do with GMP and/or SWI-Prolog whatever you wish, but I'm not going that route. Smells like a can or worms to turn this into a portable solution and 99% of the users simply want to start Prolog and use the system wide shared gmp object.
I am more and more convinced that only the overall application should be allowed to invoke mp_memory_functions(): any component doing so can only do that reliably with a private GMP version. Cheers,
Even that is probably generally not safe :-(
--- Jan