cyclegraph: bugfix - use model-checker's allocater for CycleNode::edges
authorBrian Norris <banorris@uci.edu>
Tue, 11 Dec 2012 20:56:59 +0000 (12:56 -0800)
committerBrian Norris <banorris@uci.edu>
Tue, 11 Dec 2012 20:58:31 +0000 (12:58 -0800)
This vector should use our SnapshotAlloc allocator, to avoid polluting
the user's memory allocator.

This solves an annoying bug that causes us to hit an ASSERT() when a
user's threads aren't allocated in the same location every execution.

cyclegraph.h

index 829c845f75b1a34019922c02640e092ee88ae004..d9fa631879b361923ea3cf6f9bc21740983b0acf 100644 (file)
@@ -82,7 +82,7 @@ class CycleNode {
        const ModelAction *action;
 
        /** @brief The edges leading out from this node */
-       std::vector<CycleNode *> edges;
+       std::vector<CycleNode *, SnapshotAlloc<CycleNode *> > edges;
 
        /** Pointer to a RMW node that reads from this node, or NULL, if none
         * exists */