#include "mymemory.h"
#include "common.h"
#include "context.h"
+#include "model.h"
/** PageAlignedAdressUpdate return a page aligned address for the
* address being added as a side effect the numBytes are also changed.
#else /* !USE_MPROTECT_SNAPSHOT */
-#define SHARED_MEMORY_DEFAULT (100 * ((size_t)1 << 20)) // 100mb for the shared memory
+#define SHARED_MEMORY_DEFAULT (200 * ((size_t)1 << 20)) // 100mb for the shared memory
#define STACK_SIZE_DEFAULT (((size_t)1 << 20) * 20) // 20 mb out of the above 100 mb for my stack
struct fork_snapshotter {
/* switch back here when takesnapshot is called */
snapshotid = fork_snap->currSnapShotID;
-
+ if (model->params.nofork) {
+ setcontext(&fork_snap->shared_ctxt);
+ exit(EXIT_SUCCESS);
+ }
+
while (true) {
pid_t forkedID;
fork_snap->currSnapShotID = snapshotid + 1;