add more classes to snapshotting region
authorBrian Norris <banorris@uci.edu>
Thu, 24 May 2012 18:32:55 +0000 (11:32 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 25 May 2012 23:14:22 +0000 (16:14 -0700)
Classes that don't use MyAlloc or MEMALLOC are snapshotted by default.

model.cc
model.h
nodestack.h
schedule.h
threads.h

index 47b1b4dd666e5043129cda9e35d6cbde0727a754..28880dd266ead573229604e03a2d3370b89d4057 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -45,7 +45,7 @@ ModelChecker::~ModelChecker()
 void ModelChecker::reset_to_initial_state()
 {
        DEBUG("+++ Resetting to initial state +++\n");
-       std::map<int, class Thread *, std::less< int >, MyAlloc< std::pair< int, class Thread * > > >::iterator it;
+       std::map<int, class Thread *>::iterator it;
        for (it = thread_map.begin(); it != thread_map.end(); it++)
                delete (*it).second;
        thread_map.clear();
diff --git a/model.h b/model.h
index 99ec69e62eb6908e1db1ea104f0c05222b0f3d9c..9d2fd5a17f402babf0aeae888c00c6d2c0b75d46 100644 (file)
--- a/model.h
+++ b/model.h
@@ -63,7 +63,7 @@ private:
 
        ucontext_t *system_context;
        action_list_t *action_trace;
-       std::map<int, class Thread *, std::less< int >, MyAlloc< std::pair< const int, class Thread * > > > thread_map;
+       std::map<int, class Thread *> thread_map;
        class NodeStack *node_stack;
        ModelAction *next_backtrack;
 };
index 3a0ee74cf0c47a3717997d7a47c04d0a9b824b4f..bd64c4aa859d64f7a2eddcf9282ac9fbb5b1ed16 100644 (file)
@@ -39,7 +39,7 @@ private:
        std::vector<bool> backtrack;
 };
 
-typedef std::list<class Node *> node_list_t;
+typedef std::list<class Node *, MyAlloc< class Node * > > node_list_t;
 
 class NodeStack {
 public:
index c99748c730a4812a303eecf2d30cfc0876a17bd5..f4965369b2a62be67a124ae29a44b4172c28f0eb 100644 (file)
@@ -16,9 +16,9 @@ public:
        Thread * get_current_thread(void);
        void print();
 
-       MEMALLOC
+       SNAPSHOTALLOC
 private:
-       std::list<Thread *, MyAlloc< Thread * > > readyList;
+       std::list<Thread *> readyList;
        Thread *current;
 };
 
index ebe33a3631d3e6815b33ed12b1e47ba972f1a8b1..e52c324eb0fb81119d8063625c21387443105b18 100644 (file)
--- a/threads.h
+++ b/threads.h
@@ -33,7 +33,7 @@ public:
 
        friend void thread_startup();
 
-       MEMALLOC
+       SNAPSHOTALLOC
 private:
        int create_context();
        Thread *parent;