RE: why use memcpy when memmove is there?

2007-08-14 Thread David Schwartz
> 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) > >

Re: why use memcpy when memmove is there?

2007-08-13 Thread Stefan Richter
sk malik wrote: > 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 ca

Re: why use memcpy when memmove is there?

2007-08-13 Thread Robert Hancock
sk malik 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) w

Re: why use memcpy when memmove is there?

2007-08-13 Thread Jan Engelhardt
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) > >wh

why use memcpy when memmove is there?

2007-08-13 Thread sk malik
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