Why is Linux memmove() implemented the way it is?
问题 From the Linux manpage for memmove(3) The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest. Instead of allocating a temporary array and copy the values twice we could just do the following: void *my_memmove(void *dest, const void *src, size_t n) { signed