diff options
author | Geoff Cant <[email protected]> | 2010-01-12 22:30:04 +1300 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-02-06 09:50:39 +0100 |
commit | 56c0170c68a83634c6e2d955723b92c70b117c64 (patch) | |
tree | 13b2ea63c6b96fa4953879da1c86928c706b37eb /erts/emulator/Makefile.in | |
parent | d17dd27c7d9b98f2cfd243fadd58a477c3edd7f1 (diff) | |
download | otp-56c0170c68a83634c6e2d955723b92c70b117c64.tar.gz otp-56c0170c68a83634c6e2d955723b92c70b117c64.tar.bz2 otp-56c0170c68a83634c6e2d955723b92c70b117c64.zip |
Fix hipe memory allocation problems on darwin/amd64
HiPE on amd64 needs to be able to allocate memory in the 0x20000000+
range so that compiled code will be addressable with 32bit pointers
(when sign extended). By default, when building 64bit executables on
OS X, PAGEZERO occupies the first 4GB of virtual memory. The PAGEZERO
segment cannot be mmap(ed) or vm_allocate(d) into.
To avoid this problem we use the -pagezero_size linker flag to reduce
the size of PAGEZERO and free up the 0x20000000+ space.
Diffstat (limited to 'erts/emulator/Makefile.in')
-rw-r--r-- | erts/emulator/Makefile.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index bc846d1e3d..97c21ce28f 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -167,6 +167,9 @@ ifeq ($(OPSYS),linux) ppcBEAMLDFLAGS=-Wl,-m,elf32ppc ppc64BEAMLDFLAGS=-Wl,-m,elf64ppc,-T,hipe/elf64ppc.x endif +ifeq ($(OPSYS),darwin) +amd64BEAMLDFLAGS=-pagezero_size 0x10000000 +endif HIPEBEAMLDFLAGS=$($(ARCH)BEAMLDFLAGS) endif |