This is the signature of the function:
void *memcpy(void * restrict dest, const void * restrict src, size_t n);
Note the restrict
keyword. This keyword guarantees that the two memory locations are not overlapping. It enables better optimization. If the regions overlap anyway, it is undefined behavior.