void *TaskCode(void *argument) { int tid; char * s; tid = *((int *) argument); // tid = **argument; printf("thread %d: calling malloc\n", tid); s = (char*) malloc(100); printf("thread %d: malloc called\n", tid); return NULL; }