Kristen Eisenberg | 13 Oct 15:37 2011

Fixing "OS allocated a heap in high memory"

Hey guys,

Recent changes to malloc on OpenBSD mean that nhc98 builds now die with
the "OS allocated a heap in high memory" error, as malloc is putting
things above the 0x80000000 line.

Switching the heap allocation to use mmap with a hint to allocate
somewhere lower fixes it at least on x86/openbsd. The ghc testsuite
runs, for example. The mmap code is stolen from MBlock.c in ghc.

Any options on this? Is it reasonable? (I'd like to use it as a custom
patch in the OpenBSD port of nhc98, but want to check I'm not doing
anything hideously wrong :)

Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Telefon: +49 (33)
utebachmeier at
Site: - Billige Flüge vergleichen
Nhc-bugs mailing list
Nhc-bugs <at>