HandlePF(SIGSEGV, &si, NULL);
snapshotrecord->lastBackingPage--; //remove the fake page we copied
- basemySpace=model_malloc((numheappages+1)*PAGESIZE);
+ void *basemySpace = model_malloc((numheappages+1)*PAGESIZE);
void * pagealignedbase=PageAlignAddressUpward(basemySpace);
- mySpace = create_mspace_with_base(pagealignedbase, numheappages*PAGESIZE, 1 );
+ snapshot_space = create_mspace_with_base(pagealignedbase, numheappages*PAGESIZE, 1 );
addMemoryRegionToSnapShot(pagealignedbase, numheappages);
entryPoint();
}
void initSnapshotLibrary(unsigned int numbackingpages,
unsigned int numsnapshots, unsigned int nummemoryregions,
unsigned int numheappages, VoidFuncPtr entryPoint) {
- basemySpace=system_malloc((numheappages+1)*PAGESIZE);
+ void *basemySpace = system_malloc((numheappages+1)*PAGESIZE);
void * pagealignedbase=PageAlignAddressUpward(basemySpace);
- mySpace = create_mspace_with_base(pagealignedbase, numheappages*PAGESIZE, 1 );
+ snapshot_space = create_mspace_with_base(pagealignedbase, numheappages * PAGESIZE, 1);
if (!snapshotrecord)
createSharedMemory();
* @param theID is the snapshot identifier to rollback to.
*/
void rollBack( snapshot_id theID ){
-#if USE_MPOTECT_SNAPSHOT==2
+#if USE_MPROTECT_SNAPSHOT==2
if (snapshotrecord->lastSnapShot==(theID+1)) {
for(unsigned int page=snapshotrecord->snapShots[theID].firstBackingPage; page<snapshotrecord->lastBackingPage; page++) {
memcpy(snapshotrecord->backingRecords[page].basePtrOfPage, &snapshotrecord->backingStore[page], sizeof(struct SnapShotPage));