This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
@@ -51,6 +51,10 @@ MEMMOVE (a1, a2, len) unsigned long int dstp = (long int) dest; unsigned long int srcp = (long int) src;
+ /* If there is no overlap between ranges, call the builtin memcpy. */
+ if ( (dstp > (srcp + len)) || (srcp > (dstp + len)) )
+ return __builtin_memcpy (dest, src, len);
+
/* This test makes the forward copying code be used whenever possible.
Reduces the working set. */
if (dstp - srcp >= len) /* *Unsigned* compare! */
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |