allocate all thread memory at once