[Mono-list] cpblk?

Dick Porter dick@ximian.com
Fri, 24 May 2002 13:27:48 +0100


On Fri, May 24, 2002 at 01:02:01PM +0200, Dietmar Maurer wrote:
> I just implemented it using unix memcpy(). Doku for memcpy states it
> does not work for overlapping regions, but IMO it makes no sense to make
> that work, it only makes things slower.

You could use memmove(3) instead.  If that really is a lot slower, you
could check for overlap first and memcpy() if it's safe.  I'd expect the
memmove() implementation to do that though.

- Dick