X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FMBlock.c;h=331982d5537ccec1027616d8e6ae54f465004a51;hb=63539f9d057f2143ea395da99584bc898b321c9b;hp=0ce1e762a9eeeab2412c1947d4cb77edf44d4ef5;hpb=153b9cb9b11e05c4edb1b6bc0a7b972660e41f70;p=ghc-hetmet.git diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index 0ce1e76..331982d 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -134,6 +134,16 @@ getMBlock(void) chunk, on the grounds that this is aligned and likely to be free. If it turns out that we were wrong, we have to munmap() and try again using the general method. + + Note on posix_memalign(): this interface is available on recent + systems and appears to provide exactly what we want. However, it + turns out not to be as good as our mmap() implementation, because + it wastes extra space (using double the address space, in a test on + x86_64/Linux). The problem seems to be that posix_memalign() + returns memory that can be free()'d, so the library must store + extra information along with the allocated block, thus messing up + the alignment. Hence, we don't use posix_memalign() for now. + -------------------------------------------------------------------------- */ #if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS)