From eb2b8a0c80c5266ef913bf9001c52b9890077391 Mon Sep 17 00:00:00 2001 From: Roy Schuster Date: Fri, 12 Apr 2019 10:10:58 +0100 Subject: [PATCH] Checking for redefinition of SNMALLOC_EXPOSE_PAGEMAP, since it can now be a cmake argument --- src/test/func/two_alloc_types/alloc1.cc | 4 +++- src/test/func/two_alloc_types/alloc2.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/func/two_alloc_types/alloc1.cc b/src/test/func/two_alloc_types/alloc1.cc index c86dcde..8937323 100644 --- a/src/test/func/two_alloc_types/alloc1.cc +++ b/src/test/func/two_alloc_types/alloc1.cc @@ -4,7 +4,9 @@ #define USE_RESERVE_MULTIPLE 1 #define NO_BOOTSTRAP_ALLOCATOR #define IS_ADDRESS_SPACE_CONSTRAINED -#define SNMALLOC_EXPOSE_PAGEMAP +#ifndef SNMALLOC_EXPOSE_PAGEMAP +# define SNMALLOC_EXPOSE_PAGEMAP +#endif #define SNMALLOC_NAME_MANGLE(a) enclave_##a // Redefine the namespace, so we can have two versions. #define snmalloc snmalloc_enclave diff --git a/src/test/func/two_alloc_types/alloc2.cc b/src/test/func/two_alloc_types/alloc2.cc index 5338054..ca55707 100644 --- a/src/test/func/two_alloc_types/alloc2.cc +++ b/src/test/func/two_alloc_types/alloc2.cc @@ -1,7 +1,9 @@ #undef IS_ADDRESS_SPACE_CONSTRAINED #define SNMALLOC_NAME_MANGLE(a) host_##a #define NO_BOOTSTRAP_ALLOCATOR -#define SNMALLOC_EXPOSE_PAGEMAP +#ifndef SNMALLOC_EXPOSE_PAGEMAP +# define SNMALLOC_EXPOSE_PAGEMAP +#endif // Redefine the namespace, so we can have two versions. #define snmalloc snmalloc_host #include "../../../override/malloc.cc"