Fixing "OS allocated a heap in high memory"

Kristen Eisenberg <[email protected]> Thu, 13 Oct 2011 06:37:05 -0700 (PDT)
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Message-ID <[email protected]>
--===============0839091383107388995==
Content-Type: multipart/alternative; boundary="518238472-1661010847-1318513025=:93141"

--518238472-1661010847-1318513025=:93141
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hey guys,=0A=0ARecent changes to malloc on OpenBSD mean that nhc98 builds n=
ow die with=0Athe "OS allocated a heap in high memory" error, as malloc is =
putting=0Athings above the 0x80000000 line.=0A=0ASwitching the heap allocat=
ion to use mmap with a hint to allocate=0Asomewhere lower fixes it at least=
 on x86/openbsd. The ghc testsuite=0Aruns, for example. The mmap code is st=
olen from MBlock.c in ghc.=0A=0AAny options on this? Is it reasonable? (I'd=
 like to use it as a custom=0Apatch in the OpenBSD port of nhc98, but want =
to check I'm not doing=0Aanything hideously wrong :)=0A=0A=0AKristen Eisenb=
erg=0ABillige Fl=FCge=0AMarketing GmbH=0AEmanuelstr. 3,=0A10317 Berlin=0ADe=
utschland=0ATelefon: +49 (33)=0A5310967=0AEmail:=0Autebachmeier at=0Agmail.=
com=0ASite:=0Ahttp://flug.airego.de
- Billige Fl=FCge vergleichen
--518238472-1661010847-1318513025=:93141
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"color:#000; background-color:#fff; font-family:ti=
mes new roman, new york, times, serif;font-size:12pt"><div>Hey guys,<br><br=
>Recent changes to malloc on OpenBSD mean that nhc98 builds now die with<br=
>the "OS allocated a heap in high memory" error, as malloc is putting<br>th=
ings above the 0x80000000 line.<br><br>Switching the heap allocation to use=
 mmap with a hint to allocate<br>somewhere lower fixes it at least on x86/o=
penbsd. The ghc testsuite<br>runs, for example. The mmap code is stolen fro=
m MBlock.c in ghc.<br><br>Any options on this? Is it reasonable? (I'd like =
to use it as a custom<br>patch in the OpenBSD port of nhc98, but want to ch=
eck I'm not doing<br>anything hideously wrong :)</div><div><br></div><div>


<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">K=
risten Eisenberg</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">B=
illige Fl=FCge</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">M=
arketing GmbH</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">E=
manuelstr. 3,</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">1=
0317 Berlin</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">D=
eutschland</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">T=
elefon: +49 (33)</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">5=
310967</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">E=
mail:</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">u=
tebachmeier at</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">g=
mail.com</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">S=
ite:</span></div>

<div class=3D"MsoNormal"><span lang=3D"DE" style=3D"mso-ansi-language:DE">h=
ttp://flug.airego.de
- Billige Fl=FCge vergleichen</span></div></div></div></body></html>
--518238472-1661010847-1318513025=:93141--


--===============0839091383107388995==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Nhc-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/nhc-bugs

--===============0839091383107388995==--