[GHC] #8627: mallocForeignPtrBytes documentation unobvious regarding memory alignment
GHC
ghc-devs at haskell.org
Tue Dec 24 00:44:31 UTC 2013
#8627: mallocForeignPtrBytes documentation unobvious regarding memory alignment
------------------------------------+-------------------------------------
Reporter: schernichkin | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Documentation | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
According to the current documentation:
mallocForeignPtr - is equivalent to do { p <- malloc; newForeignPtr
finalizerFree p }. It's ok since we can read that the "block of memory is
sufficiently aligned" if the mallocBytes function descriprion and
newAlignedPinnedByteArray in the function implementation.
mallocForeignPtrBytes - "similar to mallocForeignPtr" but will it alloc
aligned memory? Internally it uses newPinnedByteArray which implies memory
will not be aligned, but does it really makes any sense?
Plz correct documentation to make it more obvious.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8627>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list