Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/29ec96c89d19c1b40a8990466424ff35be096780 >--------------------------------------------------------------- commit 29ec96c89d19c1b40a8990466424ff35be096780 Author: Simon Marlow <[email protected]> Date: Mon Aug 20 13:14:47 2012 +0100 OS X: use mmap() instead of malloc for allocating the bss (#7040) MERGED from commit e590ad77f9596a8389409ae56ea902c97e5dbfb0 >--------------------------------------------------------------- rts/Linker.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/rts/Linker.c b/rts/Linker.c index 198ef9f..203a141 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -6147,8 +6147,13 @@ ocGetNames_MachO(ObjectCode* oc) if((sections[i].flags & SECTION_TYPE) == S_ZEROFILL) { +#ifdef USE_MMAP + char * zeroFillArea = mmapForLinker(sections[i].size, MAP_ANONYMOUS, -1); + memset(zeroFillArea, 0, sections[i].size); +#else char * zeroFillArea = stgCallocBytes(1,sections[i].size, "ocGetNames_MachO(common symbols)"); +#endif sections[i].offset = zeroFillArea - image; } _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
