Refactor the computation of the chunk size into its own function, thus avoiding an "unreachable code" error from Clang.