[GHC] #3387: Provide a CInt instance for unboxed arrays
GHC
trac at galois.com
Wed Jul 22 04:19:49 EDT 2009
#3387: Provide a CInt instance for unboxed arrays
---------------------------------+------------------------------------------
Reporter: tibbe | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by simonmar):
As we discussed on IRC, I'm not sure the comment about the speed of
StorableArray is still true. It probably dates from before we optimised
the representation of `ForeignPtr`.
A `StorableArray` allocated using `newArray` is on the Haskell heap, and
GC'd as usual. However, you can also make a `StorableArray` using
`unsafeForeignPtrToStorableArray`, in which case the memory can reside
anywhere you like (but presumably the `ForeignPtr` has a finalizer to
deallocate it).
Can I close this ticket?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3387#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list