00018 void *memcpy(void *dst, const void *src, size_t len)
00019 {
00020 size_t i;
00021
00022 /*
00023 * memcpy does not support overlappi
len%sizeof(long)
checks if you are trying to copy full-longs not a part of long
.
00035 if ((uintptr_t)dst % sizeof(long) == 0 &&
00036 (uintptr_t)src % sizeof(long) == 0 &&
00037 len % sizeof(long) == 0) {
00038
00039 long *d = dst;
00040 const long *s = src;
00041
00042 for (i=0; i
checks for alignment and if true, copies fast(sizeof(long)
bytes at a time).
00046 else {
00047 char *d = dst;
00048 const char *s = src;
00049
00050 for (i=0; i
this is for the mis-aligned arrays (slow copy (1 byte at a time))