Memory distribution for join tasks