From: Brian Norris <banorris@uci.edu>
Date: Tue, 2 Oct 2012 00:11:52 +0000 (-0700)
Subject: mymemory: add placeholder "snapshot_{calloc,malloc,free}" functions
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=928115156b5d083b02ab934e2b291781af16cc0f;p=cdsspec-compiler.git

mymemory: add placeholder "snapshot_{calloc,malloc,free}" functions

Eventually, we may want a separate heap for the model-checker's
snapshotted data (vs. user's snapshotted data), so create allocator
stubs for this. This allows us to begin annotating our malloc()'s
properly.
---

diff --git a/mymemory.h b/mymemory.h
index 4c44f5b..3059e69 100644
--- a/mymemory.h
+++ b/mymemory.h
@@ -31,6 +31,16 @@ void *MYMALLOC(size_t size);
 void *MYCALLOC(size_t count, size_t size);
 void MYFREE(void *ptr);
 
+static inline void * snapshot_malloc(size_t size) {
+	return malloc(size);
+}
+static inline void * snapshot_calloc(size_t count, size_t size) {
+	return calloc(count, size);
+}
+static inline void snapshot_free(void *ptr) {
+	free(ptr);
+}
+
 void system_free( void * ptr );
 void *system_malloc( size_t size );