[nhc-bugs] Fixing "OS allocated a heap in high memory"

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat Oct 22 21:47:57 EDT 2005


Malcolm.Wallace:
> dons at cse.unsw.edu.au (Donald Bruce Stewart) writes:
> 
> > Switching the heap allocation to use mmap with a hint to allocate
> > somewhere lower fixes it at least on x86/openbsd.
> 
> Thanks for the fix(es).  Eventually the high-memory problem will be
> fixed by not using the top bit for GC, but until then, your approach
> will be a useful workaround.  I'll check it into CVS.

How do we deal with portability issues in nhc? The code I submitted will
run find on the BSDs and Linux, but for Solaris, Irix, HPUS, and Darwin
when need slight variations (which ghc currently has) (and we're stuck
with malloc on Windows).

Does nhc have some equivalent of the 
    #if defined(solaris2_HOST_OS) || defined(irix_HOST_OS)
macros?

-- Don


More information about the Nhc-bugs mailing list