Allocate memory in thread creation (duh)