changes
authorroot <root@dw-6.eecs.uci.edu>
Wed, 26 Jun 2019 20:04:45 +0000 (13:04 -0700)
committerroot <root@dw-6.eecs.uci.edu>
Wed, 26 Jun 2019 20:04:45 +0000 (13:04 -0700)
action.h
model.cc
mymemory.cc
nodestack.h

index 5f7d25c3f38b394e690f2bf946e44fe5ed4eb944..cebbec1beb6ba7d3f409673e92a214b792c8e623 100644 (file)
--- 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;
index 84a60a510456fbea7cd6f0e4e6df87499c40ee48..61d0b64c8ba4042e31a8945b9ecce5f8a20f1136 100644 (file)
--- 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;
 }
index f7b716247e3965d5b2c2f3e255846b60aeda01c5..84600ae9d39ebac840d9cfe606bb5b030778b170 100644 (file)
@@ -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. */
index fa356d0e9ae666db61bb993423b7b915df2c815b..09a79e4057d882431b9e662373c2b3a19bfff5fb 100644 (file)
@@ -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 *> node_list_t;
+typedef SnapVector<Node *> 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;