From: root Date: Wed, 26 Jun 2019 20:04:45 +0000 (-0700) Subject: changes X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=02e8c0e82227e667163f370f663935272599a4ba changes --- diff --git a/action.h b/action.h index 5f7d25c3..cebbec1b 100644 --- a/action.h +++ b/action.h @@ -176,7 +176,7 @@ public: /* to accomodate pthread create and join */ Thread * thread_operand; void set_thread_operand(Thread *th) { thread_operand = th; } - MEMALLOC + SNAPSHOTALLOC private: const char * get_type_str() const; const char * get_mo_str() const; diff --git a/model.cc b/model.cc index 84a60a51..61d0b64c 100644 --- a/model.cc +++ b/model.cc @@ -54,8 +54,6 @@ void ModelChecker::setParams(struct model_params params) { */ void ModelChecker::reset_to_initial_state() { - DEBUG("+++ Resetting to initial state +++\n"); - node_stack->reset_execution(); /** * FIXME: if we utilize partial rollback, we will need to free only @@ -253,7 +251,6 @@ bool ModelChecker::next_execution() // test code execution_number++; reset_to_initial_state(); - node_stack->full_reset(); return false; } @@ -354,7 +351,6 @@ void ModelChecker::do_restart() { restart_flag = false; reset_to_initial_state(); - node_stack->full_reset(); memset(&stats,0,sizeof(struct execution_stats)); execution_number = 1; } diff --git a/mymemory.cc b/mymemory.cc index f7b71624..84600ae9 100644 --- a/mymemory.cc +++ b/mymemory.cc @@ -74,7 +74,7 @@ void *model_malloc(size_t size) /** @brief Snapshotting malloc, for use by model-checker (not user progs) */ void * snapshot_malloc(size_t size) { - void *tmp = mspace_malloc(model_snapshot_space, size); + void *tmp = malloc(size); ASSERT(tmp); return tmp; } @@ -82,7 +82,7 @@ void * snapshot_malloc(size_t size) /** @brief Snapshotting calloc, for use by model-checker (not user progs) */ void * snapshot_calloc(size_t count, size_t size) { - void *tmp = mspace_calloc(model_snapshot_space, count, size); + void *tmp = calloc(count, size); ASSERT(tmp); return tmp; } @@ -90,7 +90,7 @@ void * snapshot_calloc(size_t count, size_t size) /** @brief Snapshotting realloc, for use by model-checker (not user progs) */ void *snapshot_realloc(void *ptr, size_t size) { - void *tmp = mspace_realloc(model_snapshot_space, ptr, size); + void *tmp = realloc(ptr, size); ASSERT(tmp); return tmp; } @@ -98,7 +98,7 @@ void *snapshot_realloc(void *ptr, size_t size) /** @brief Snapshotting free, for use by model-checker (not user progs) */ void snapshot_free(void *ptr) { - mspace_free(model_snapshot_space, ptr); + free(ptr); } /** Non-snapshotting free for our use. */ diff --git a/nodestack.h b/nodestack.h index fa356d0e..09a79e40 100644 --- a/nodestack.h +++ b/nodestack.h @@ -32,7 +32,7 @@ public: ModelAction * get_uninit_action() const { return uninit_action; } void print() const; - MEMALLOC + SNAPSHOTALLOC private: ModelAction * const action; @@ -40,7 +40,7 @@ private: ModelAction *uninit_action; }; -typedef ModelVector node_list_t; +typedef SnapVector node_list_t; /** * @brief A stack of nodes @@ -63,7 +63,7 @@ public: void full_reset(); void print() const; - MEMALLOC + SNAPSHOTALLOC private: node_list_t node_list; const struct model_params * get_params() const;