SNAPSHOTALLOC
private:
CycleNode * getNode(const ModelAction *);
+ HashTable<CycleNode *, CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> * discovered;
/** @brief A table for mapping ModelActions to CycleNodes */
HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
bool hasRMWViolation;
bool oldRMWViolation;
- std::vector<CycleNode *> rollbackvector;
- std::vector<CycleNode *> rmwrollbackvector;
+ std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > rollbackvector;
+ std::vector< CycleNode *, SnapshotAlloc<CycleNode *> > rmwrollbackvector;
};
/** @brief A node within a CycleGraph; corresponds to one ModelAction */
public:
CycleNode(const ModelAction *action);
bool addEdge(CycleNode * node);
- std::vector<CycleNode *> * getEdges();
+ CycleNode * getEdge(unsigned int i) const;
+ unsigned int getNumEdges() const;
bool setRMW(CycleNode *);
CycleNode* getRMW();
const ModelAction * getAction() {return action;};
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 */