From: Brian Norris Date: Tue, 2 Apr 2013 23:00:30 +0000 (-0700) Subject: mymemory: fix compiling with !USE_MPROTECT_SNAPSHOT X-Git-Tag: oopsla2013~117 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=1ecf5bd03252dd97fa89b8528820b84adf810d07 mymemory: fix compiling with !USE_MPROTECT_SNAPSHOT --- diff --git a/mymemory.cc b/mymemory.cc index c79ad9a..9e05c36 100644 --- a/mymemory.cc +++ b/mymemory.cc @@ -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 */