#include <cafe/os.h>

void *  OSBlockMove(void* dst, const void* src, size_t size, BOOL flush);


dst Start address of destination area.
src Start address of source area.
size Number of bytes to be copied.
flush If true, to prevent cache pollution, OSBlockMove flushes the CPU cache line after its data is copied. For this reason, after OSBlockMove completes, the source and copy destination areas will not be left in cache. However, data not aligned to 32 bytes may be sharing a cache line with data irrelevant to copying. OSBlockMove does not flush such a cache line. If false, data in the source and destination areas stays in cache when the copy is complete.

Return Values

Pointer to start address of destination area.


Optimized memmove function. OSBlockMove copies size bytes from source to destination. The source and destination areas may overlap.

Do Not Call From

Multiple threads This function is not thread-safe.

Revision History

2013/05/08 Automated cleanup pass.
2012/05/14 Match actual prototype.
2011/08/09 Initial version.