mymemory: add placeholder "snapshot_{calloc,malloc,free}" functions
authorBrian Norris <banorris@uci.edu>
Tue, 2 Oct 2012 00:11:52 +0000 (17:11 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 2 Oct 2012 00:40:18 +0000 (17:40 -0700)
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.

mymemory.h

index 4c44f5be514c4e8fdd9344f2cee7fb939ca8a3ad..3059e699960be53290c67064389bfd2c5087df4e 100644 (file)
@@ -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 );