X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;h=d5425e335dad86614b4e09db71717e0b00dfe2d2;hb=ea0cb2585eee658354f48b4bbfebaf030cccf317;hp=136e3a2eb4a2f72325db5e95e5fc9205160450b2;hpb=718fed530a17d55ab479921e8dffebea4f98cbdf;p=model-checker.git diff --git a/nodestack.cc b/nodestack.cc index 136e3a2..d5425e3 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -77,7 +77,7 @@ Node::~Node() if (action) delete action; if (enabled_array) - MYFREE(enabled_array); + model_free(enabled_array); } /** Prints debugging info for the ModelAction associated with this Node */ @@ -158,7 +158,7 @@ bool Node::add_future_value(uint64_t value, modelclock_t expiration) { if (future_values[i].value == value) { if (future_values[i].expiration>=expiration) return false; - if (future_index < i) { + if (future_index < ((int) i)) { suitableindex=i; } } @@ -178,7 +178,7 @@ bool Node::add_future_value(uint64_t value, modelclock_t expiration) { * @return true if the future_values set is empty. */ bool Node::future_value_empty() { - return ((future_index + 1) >= future_values.size()); + return ((future_index + 1) >= ((int)future_values.size())); } /** @@ -218,7 +218,7 @@ bool Node::read_from_empty() { void Node::explore_child(ModelAction *act, bool * is_enabled) { if ( ! enabled_array ) - enabled_array=(bool *)MYMALLOC(sizeof(bool)*num_threads); + enabled_array=(bool *)model_malloc(sizeof(bool)*num_threads); if (is_enabled != NULL) memcpy(enabled_array, is_enabled, sizeof(bool)*num_threads); else { @@ -288,12 +288,12 @@ void Node::add_read_from(const ModelAction *act) * @return The first element in future_values */ uint64_t Node::get_future_value() { - ASSERT(future_index