GetMBlock: misaligned block

Carl R. Witty cwitty at newtonlabs.com
Wed Sep 11 19:32:15 EDT 2002


"Simon Marlow" <simonmar at microsoft.com> writes:

> The problem is that GHC is asking for memory at a particular address
> (0x50000000) and the kernel is returning memory elsewhere that doesn't
> satisfy our aligment constraints (1M aligned).  We don't particularly
> care where we get memory from, but it must be properly aligned.

Can you just mmap more memory than you need (an extra megabyte) and
unmap the portions that aren't correctly aligned?  (To avoid the
overhead, you could do this only when a correctly-sized mmap gave you
unaligned memory.)

Carl Witty



More information about the Glasgow-haskell-bugs mailing list