Node::Node(ModelAction *act, Node *par, int nthreads, Node *prevfairness) :
read_from_status(READ_FROM_PAST),
action(act),
+ uninit_action(NULL),
parent(par),
num_threads(nthreads),
explored_children(num_threads),
}
void Node::update_yield(Scheduler * scheduler) {
- yield_data=(int *) model_calloc(1, sizeof(int)*num_threads*num_threads);
+ if (yield_data==NULL)
+ yield_data=(int *) model_calloc(1, sizeof(int)*num_threads*num_threads);
//handle base case
if (parent == NULL) {
for(int i = 0; i < num_threads*num_threads; i++) {
Node::~Node()
{
delete action;
+ if (uninit_action)
+ delete uninit_action;
if (enabled_array)
model_free(enabled_array);
if (yield_data)