This is function for memcpy implementation.