X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;fp=nodestack.cc;h=b9142435c5267f276d10ed9b9c5c315801bfd6f7;hb=15762db4e64b528f90fd9bf63a901d4b56b4bc4c;hp=c757af25f647339fe7ef590ad1eb989271aff222;hpb=34aa82864b18e6f11d806ef77e4b992c2e19f370;p=model-checker.git diff --git a/nodestack.cc b/nodestack.cc index c757af2..b914243 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -96,7 +96,8 @@ int Node::get_yield_data(int tid1, int tid2) const { } 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++) {