/* to accomodate pthread create and join */
Thread * thread_operand;
void set_thread_operand(Thread *th) { thread_operand = th; }
- MEMALLOC
+ SNAPSHOTALLOC
private:
const char * get_type_str() const;
const char * get_mo_str() const;
*/
void ModelChecker::reset_to_initial_state()
{
- DEBUG("+++ Resetting to initial state +++\n");
- node_stack->reset_execution();
/**
* FIXME: if we utilize partial rollback, we will need to free only
// test code
execution_number++;
reset_to_initial_state();
- node_stack->full_reset();
return false;
}
{
restart_flag = false;
reset_to_initial_state();
- node_stack->full_reset();
memset(&stats,0,sizeof(struct execution_stats));
execution_number = 1;
}
/** @brief Snapshotting malloc, for use by model-checker (not user progs) */
void * snapshot_malloc(size_t size)
{
- void *tmp = mspace_malloc(model_snapshot_space, size);
+ void *tmp = malloc(size);
ASSERT(tmp);
return tmp;
}
/** @brief Snapshotting calloc, for use by model-checker (not user progs) */
void * snapshot_calloc(size_t count, size_t size)
{
- void *tmp = mspace_calloc(model_snapshot_space, count, size);
+ void *tmp = calloc(count, size);
ASSERT(tmp);
return tmp;
}
/** @brief Snapshotting realloc, for use by model-checker (not user progs) */
void *snapshot_realloc(void *ptr, size_t size)
{
- void *tmp = mspace_realloc(model_snapshot_space, ptr, size);
+ void *tmp = realloc(ptr, size);
ASSERT(tmp);
return tmp;
}
/** @brief Snapshotting free, for use by model-checker (not user progs) */
void snapshot_free(void *ptr)
{
- mspace_free(model_snapshot_space, ptr);
+ free(ptr);
}
/** Non-snapshotting free for our use. */
ModelAction * get_uninit_action() const { return uninit_action; }
void print() const;
- MEMALLOC
+ SNAPSHOTALLOC
private:
ModelAction * const action;
ModelAction *uninit_action;
};
-typedef ModelVector<Node *> node_list_t;
+typedef SnapVector<Node *> node_list_t;
/**
* @brief A stack of nodes
void full_reset();
void print() const;
- MEMALLOC
+ SNAPSHOTALLOC
private:
node_list_t node_list;
const struct model_params * get_params() const;