X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.cc;h=09efcae619c06b78ed5c2668473c2b8143b9ea71;hb=7f6f38735411f44357208a952278a419454b52b2;hp=39f049541d69184cc012bcd042f2400208863a3a;hpb=15190694fd79202132be5f6e056fa5c00893664e;p=model-checker.git diff --git a/threads.cc b/threads.cc index 39f0495..09efcae 100644 --- a/threads.cc +++ b/threads.cc @@ -12,13 +12,13 @@ /** Allocate a stack for a new thread. */ static void * stack_allocate(size_t size) { - return malloc(size); + return snapshot_malloc(size); } /** Free a stack for a terminated thread. */ static void stack_free(void *stack) { - free(stack); + snapshot_free(stack); } /** Return the currently executing thread. */ @@ -119,6 +119,7 @@ void Thread::complete() * @param a The parameter to pass to this function. */ Thread::Thread(thrd_t *t, void (*func)(void *), void *a) : + creation(NULL), pending(NULL), start_routine(func), arg(a),