Re: Fixing "OS allocated a heap in high memory"

[email protected] (Donald Bruce Stewart) Sun, 23 Oct 2005 11:47:57 +1000
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Message-ID <[email protected]>
Malcolm.Wallace:
> [email protected] (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