X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=snapshot.cc;h=1f0cf352d2e214c0e5218818addb29fab2a37330;hp=0d38edc1c1cbc7ee0b34d393aeee50baa2e05ee8;hb=7742256df627848c1c375f979f5369a45c92057b;hpb=9b6c5d465f4a762dbe75baf2c293510ee6e9bd07 diff --git a/snapshot.cc b/snapshot.cc index 0d38edc1..1f0cf352 100644 --- a/snapshot.cc +++ b/snapshot.cc @@ -106,6 +106,7 @@ static void createSharedMemory() fork_snap->mStackSize = STACK_SIZE_DEFAULT; fork_snap->mIDToRollback = -1; fork_snap->currSnapShotID = 0; + sStaticSpace = create_shared_mspace(); } /** @@ -121,9 +122,7 @@ mspace create_shared_mspace() return create_mspace_with_base((void *)(fork_snap->mSharedMemoryBase), SHARED_MEMORY_DEFAULT - sizeof(*fork_snap), 1); } -static void fork_snapshot_init(unsigned int numbackingpages, - unsigned int numsnapshots, unsigned int nummemoryregions, - unsigned int numheappages) +static void fork_snapshot_init(unsigned int numheappages) { if (!fork_snap) createSharedMemory(); @@ -192,11 +191,9 @@ static void fork_roll_back(snapshot_id theID) * @brief Initializes the snapshot system * @param entryPoint the function that should run the program. */ -void snapshot_system_init(unsigned int numbackingpages, - unsigned int numsnapshots, unsigned int nummemoryregions, - unsigned int numheappages) +void snapshot_system_init(unsigned int numheappages) { - fork_snapshot_init(numbackingpages, numsnapshots, nummemoryregions, numheappages); + fork_snapshot_init(numheappages); } void startExecution() {