mymemory: fix compiling with !USE_MPROTECT_SNAPSHOT
authorBrian Norris <banorris@uci.edu>
Tue, 2 Apr 2013 23:00:30 +0000 (16:00 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 2 Apr 2013 23:01:46 +0000 (16:01 -0700)
mymemory.cc

index c79ad9a..9e05c36 100644 (file)
@@ -250,4 +250,19 @@ void operator delete[](void *p, size_t size)
 {
        free(p);
 }
-#endif /* USE_MPROTECT_SNAPSHOT */
+
+#else /* !USE_MPROTECT_SNAPSHOT */
+
+/** @brief Snapshotting allocation function for use by the Thread class only */
+void * Thread_malloc(size_t size)
+{
+       return malloc(size);
+}
+
+/** @brief Snapshotting free function for use by the Thread class only */
+void Thread_free(void *ptr)
+{
+       free(ptr);
+}
+
+#endif /* !USE_MPROTECT_SNAPSHOT */