projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38dfa06
)
mymemory: fix compiling with !USE_MPROTECT_SNAPSHOT
author
Brian Norris
<banorris@uci.edu>
Tue, 2 Apr 2013 23:00:30 +0000
(16:00 -0700)
committer
Brian Norris
<banorris@uci.edu>
Tue, 2 Apr 2013 23:01:46 +0000
(16:01 -0700)
mymemory.cc
patch
|
blob
|
history
diff --git
a/mymemory.cc
b/mymemory.cc
index c79ad9a47d8f2a6208f6f38853866fa77afdcf64..9e05c369235dadb077b6d09b1cfb7b2ece92180f 100644
(file)
--- 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 */