My own function for copying memory in C I have written a function that copies memory from one destination to another. I would like you to view my code and tell me if I have to fix something. That's the code:
void* memCopy(void* destination, const void* source, size_t size)
{
    double *a = (double*)source, *b = (double*)destination;
    void* end = a + (size / sizeof(double));
    while ((void*)a &lt; end)
    {
        *b = *a;
        ++a;
        ++b;
    }
    char* a2 = (char*)a;
    char* b2 = (char*)b;
    end = a2 + (size % sizeof(double));
    while (a2 &lt; end)
    {
        *b2 = *a2;
        ++a2;
        ++b2;
    }
    return destination;
}

I have used double* to make the function faster.
Your code doesn't compile cleanly with GCC:
move.c: In function 'memCopy':
move.c:16:15: warning: comparison of distinct pointer types lacks a cast
     while (a2 &lt; end)
               ^

Also 2 brief points:

Why reinvent the wheel? Most implementations of memcpy, memmove etc in the standard libraries will be correctly and efficiently implemented, in many cases not using pure C.
Your code assumes that both source and data are correctly aligned to be accessed as double. If they are not, depending on the platform the code may a) perform badly, b) give incorrect results or c) simply crash, unless I'm much mistaken. It happens to run (apparently correctly) on my PC, but that's no guarantee of portability.

The FreeBSD implementation shows how this can be done, assuming that that the mapping of pointers to uintptr_t gives values which can be masked appropriately - this is true of the relevant targets of the code, but may not be universally so.