On Aug 13 2007 11:55, sk malik wrote:
>Subject: why use memcpy when memmove is there?
>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?
memmove must copy with overlapping memory segments, while memcpy does not, and
can therefore use a different optimization strategy. But that would have been
apparent if you had looked at the code.
Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]