On 8/13/07, SK malik <srikrishanmalik@xxxxxxxxx> wrote:
Hi, All
We were looking at "[kernel]/lib/string.c"
(http://lxr.linux.no/source/lib/string.c#L500)
memcpy copies a part of memory to some other location
but It will not work for all cases of overlapping
blocks.(if the start of destination block falls
between the source block)
while memove copes with overlapping areas.
then why is memcpy present in the sources can't we
simply do
"#define memcpy memmove" in include/linux/string.h
or am I missing something?
Regards
Sri--
SK Malik
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ
Hi Sri,
My guess ...
1. fitness of purpose,
2. memcpy _MAY_ be faster than memmove
Thank You