[Narrowing to GHC hackers plus Esa] | It would be easy to change the definition of OPENSSL_malloc to call | RTS-memory as necessary. It would be more efficient for BN to be | garbage collected (these bignum libraries allocate and delete a lot | of small memory blocks (~1-2KB for large integers)). Since | ForeignPtr is simply too slow I am bringing BN value allocations into | the rts as close as possible to how you did it with GMP.
OK so you are talking of taking a copy of the BN code, changing the function names, and statically linking its allocator to GHC's RTS. If someone wants to make a program that uses BN for some other purpose, they get the original BN, whose function names don't clash, and which uses malloc. Sounds ok to me. Simon | | | > Making a single word contain either a pointer or a non-pointer | > (depending on the setting of some bit) would have some quite global | > implications, as would losing 32 bit precision from Int#. I suggest | > that you do not couple these two projects together! Do the GMP thing | > first, then investigate this later. We have quite a few bit-twidding | > ideas that we have never followed up. | | The original idea was to create a specialized Int30# for that | purpose. In any case implementing it would certainly make my | intended job--getting this done in time for the next release--a bit | more difficult. | | Best regards, | Peter _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
