Hopefully improved task_alloc