snapshot: don't need any snapshotting space for fork-based
[model-checker.git] / mymemory.cc
index 7aec2dc81d549bcf0fe82951ee902723077b5cf0..c076f5449c5a2f8e70c5ae7ef48ade0733937b5c 100644 (file)
@@ -127,9 +127,6 @@ void model_free(void *ptr)
 #endif
 }
 
-/** @brief Global mspace reference for the snapshotting heap */
-mspace snapshot_space = NULL;
-
 /** Bootstrap allocation.  Problem is that the dynamic linker calls
  *  require calloc to work and calloc requires the dynamic linker to
  *     work.  */
@@ -153,6 +150,11 @@ void * HandleEarlyAllocationRequest(size_t sz)
        return pointer;
 }
 
+#if USE_MPROTECT_SNAPSHOT
+
+/** @brief Global mspace reference for the snapshotting heap */
+mspace snapshot_space = NULL;
+
 /** Check whether this is bootstrapped memory that we should not free */
 static bool DontFree(void *ptr)
 {
@@ -222,3 +224,4 @@ void operator delete[](void *p, size_t size)
 {
        free(p);
 }
+#endif /* USE_MPROTECT_SNAPSHOT */