snapshot: use snapshot_space only in mprotect-based
[model-checker.git] / mymemory.h
index 2379b5f6c5deddae1b8fe79cd8eb0ff57be7faa4..0e274d2fa4cacc47c2ecdd557a4ae88f7e17b883 100644 (file)
@@ -7,6 +7,8 @@
 #include <stdlib.h>
 #include <limits>
 
+#include "config.h"
+
 /** MEMALLOC declares the allocators for a class to allocate
  *     memory in the non-snapshotting heap. */
 #define MEMALLOC \
@@ -152,8 +154,11 @@ extern void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
 extern mspace create_mspace_with_base(void* base, size_t capacity, int locked);
 extern mspace create_mspace(size_t capacity, int locked);
 
+#if USE_MPROTECT_SNAPSHOT
 /** @brief mspace for the snapshotting heap */
 extern mspace snapshot_space;
+#endif
+
 #ifdef __cplusplus
 };  /* end of extern "C" */
 #endif