From: Brian Demsky Date: Fri, 21 Jun 2019 05:31:45 +0000 (-0700) Subject: performance improvements X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d15971f784c68e45199ee9052773d6546af131aa;p=c11tester.git performance improvements --- diff --git a/execution.cc b/execution.cc index 52af5212..c32b6288 100644 --- a/execution.cc +++ b/execution.cc @@ -783,7 +783,7 @@ bool ModelExecution::r_modification_order(ModelAction *curr, const ModelAction * int tid = curr->get_tid(); ModelAction *prev_same_thread = NULL; /* Iterate over all threads */ - for (i = 0;i < thrd_lists->size();i++, tid = ((tid+1) == thrd_lists->size()) ? 0: tid + 1) { + for (i = 0;i < thrd_lists->size();i++, tid = (((unsigned int)(tid+1)) == thrd_lists->size()) ? 0: tid + 1) { /* Last SC fence in thread tid */ ModelAction *last_sc_fence_thread_local = NULL; if (i != 0) diff --git a/snapshot.cc b/snapshot.cc index ca54c785..bada736d 100644 --- a/snapshot.cc +++ b/snapshot.cc @@ -248,7 +248,7 @@ static void mprot_roll_back(snapshot_id theID) #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 {