Page 1 of 1

ClassEMemory::Copy

PostPosted: Apr 21, 2006 @ 8:49pm
by ChezDoodles
Is ClassEMemory::Copy equivalent to memcpy or memmove?

For overlapped memory blocks, memcpy is undefined, but memmove is guaranteed to work even if the blocks are partially overlapped.

Example:
// Insert a position in an array...
memcpy( &a[i], &a[i+1], sizeof(a[0])*j));
...might not work

however...
memmove( &a[i], &a[i+1], sizeof(a[0])*j));
...is guaranteed to work.

PostPosted: Apr 22, 2006 @ 12:04pm
by edge

PostPosted: Apr 24, 2006 @ 2:56pm
by edge