when we reuse nodes in the nodestack, we will recreate yield information and leak the old array...
}
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++) {