[Haskell-cafe] Memory-mapped arrays?
dons at galois.com
Wed Nov 7 16:57:19 EST 2007
> Is there such a thing as memory-mapped arrays in GHC?
> I'm looking for something that would let me memory-map a file of
> floats and access it as an array.
There's a commented out mmapFile for ByteString in Data.ByteString's
source. Use that, and then extract the ForeignPtr from the resulting
ByteString, and castPtr it to a Ptr CFloat, then you're in business.
More information about the Haskell-Cafe