- num_threads = model->get_num_threads();
- clock = (modelclock_t *)MYMALLOC(num_threads * sizeof(int));
- memset(clock, 0, num_threads * sizeof(int));
+ ASSERT(act);
+ num_threads = int_to_id(act->get_tid()) + 1;
+ if (parent && parent->num_threads > num_threads)
+ num_threads = parent->num_threads;
+
+ clock = (modelclock_t *)snapshot_calloc(num_threads, sizeof(int));