From 928115156b5d083b02ab934e2b291781af16cc0f Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 1 Oct 2012 17:11:52 -0700 Subject: [PATCH] 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. --- mymemory.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ); -- 2.34.1