5 /* If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
6 If USE_MPROTECT_SNAPSHOT=0, then snapshot by using fork() */
7 #define USE_MPROTECT_SNAPSHOT 1
9 /* Size of signal stack */
10 #define SIGSTACKSIZE 16384
12 typedef unsigned int snapshot_id;
14 typedef void (*VoidFuncPtr)();
15 void initSnapShotLibrary(unsigned int numbackingpages,
16 unsigned int numsnapshots, unsigned int nummemoryregions,
17 unsigned int numheappages, VoidFuncPtr entryPoint);
19 void addMemoryRegionToSnapShot( void * ptr, unsigned int numPages );
21 snapshot_id takeSnapshot( );
23 void rollBack( snapshot_id theSnapShot );
30 void createSharedLibrary();
32 }; /* end of extern "C" */