freeHaskellFunctionPtr

Fergus Henderson fjh at cs.mu.oz.au
Tue Jan 2 06:22:14 EST 2001


On 02-Jan-2001, Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> wrote:
> 
> On IA-64 C function pointers are AFAIK twice as big as data pointers
> (16 bytes!), to hold a global data pointer associated with the module
> the function came from, which is a part of a model of dynamically
> linked libraries. I don't know what ghc is going to do with it - it
> uses function pointers internally a lot! It also means that FunPtr
> will no longer be represented the same as Ptr on IA-64.

Are you sure about that?

Are you sure function pointers aren't represented as ordinary pointers
to a 16-byte block of memory that includes a code pointer and a data
pointer?

(I don't have any information about what IA64 does, but I think
representing function pointers as 16 bytes would probably be a bad
idea, since quite a bit of existing code assumes that function
pointers are the same size as data pointers, and so I'd be somewhat
surprised if they've really done that.)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.




More information about the FFI mailing list