cudaMemcpy max values for mem copy ?

I was wondering what are the max values for the cudaMemcpy() and the cudaMemcpy2D();

in terms of memory size

cudaError_t cudaMemcpy2D(void* dst, size_t dpitch,

                                         const void* src, size_t spitch,

                                         size_t width, size_t height,

                                         enum cudaMemcpyKind kind);

it’s not specified in the programming guide,

I get a crash if I run this function with height bigger than 2^16

So I was wondering for cudaMemcpy() what is the max for :size_t count

and for cudaMemcpy2D() what is the max for size_t width, size_t height.

and what is the reason of this ? is it hardware ?