From f3374b526619671fe576d593dcdc6bd048bf5603 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 21 Apr 2014 22:26:46 +0200 Subject: x64: Allow building with LUAJIT_USE_SYSMALLOC and LUAJIT_USE_VALGRIND. Valgrind 3.9 killed MAP_32BIT support. Ugh. So now we have to rely on undocumented behavior where Valgrind always allocates from the bottom of memory. Alas, such a binary won't run properly without Valgrind. --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 9551781a..c558003c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -122,8 +122,10 @@ XCFLAGS= # # Use the system provided memory allocator (realloc) instead of the # bundled memory allocator. This is slower, but sometimes helpful for -# debugging. It's helpful for Valgrind's memcheck tool, too. This option -# cannot be enabled on x64, since the built-in allocator is mandatory. +# debugging. This option cannot be enabled on x64, since realloc usually +# doesn't return addresses in the right address range. +# OTOH this option is mandatory for Valgrind's memcheck tool on x64 and +# the only way to get useful results from it for all other architectures. #XCFLAGS+= -DLUAJIT_USE_SYSMALLOC # # This define is required to run LuaJIT under Valgrind. The Valgrind -- cgit v1.2.3-55-g6feb