remove unused #define
[model-checker.git] / mymemory.cc
index ac46b1178df29eeabacdd063f85cbd9783dc5260..1af6109725978bc39e36964c9a964f31acc56346 100644 (file)
@@ -3,7 +3,6 @@
 #include "snapshotimp.h"
 #include <stdio.h>
 #include <dlfcn.h>
-#define MSPACE_SIZE ( 1 << 20 )
 #if !USE_CHECKPOINTING
 static mspace sStaticSpace = NULL;
 #endif
@@ -52,13 +51,8 @@ void MYFREE(void *ptr) {
   mspace_free( sStaticSpace, ptr );
 #endif
 }
-static mspace mySpace = NULL;
+mspace mySpace = NULL;
 void *malloc( size_t size ) {
-  if( NULL == mySpace ){
-    //void * mem = MYMALLOC( MSPACE_SIZE );
-    mySpace = create_mspace( MSPACE_SIZE, 1 );
-    AddUserHeapToSnapshot();
-  }
   return mspace_malloc( mySpace, size );
 }
 
@@ -66,13 +60,6 @@ void free( void * ptr ){
   mspace_free( mySpace, ptr );
 }
 
-void AddUserHeapToSnapshot(){
-  static bool alreadySnapshotted = false;
-  if( alreadySnapshotted ) return;
-  addMemoryRegionToSnapShot( mySpace, MSPACE_SIZE / PAGESIZE );
-}
-
-
 void * operator new(size_t size) throw(std::bad_alloc) {
   return MYMALLOC(size);
 }