tot_nr_writes = calloc(nr_writers, sizeof(*tot_nr_writes));
per_thread_lock = calloc(nr_readers, sizeof(*per_thread_lock));
for (i = 0; i < nr_readers; i++) {
tot_nr_writes = calloc(nr_writers, sizeof(*tot_nr_writes));
per_thread_lock = calloc(nr_readers, sizeof(*per_thread_lock));
for (i = 0; i < nr_readers; i++) {