Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
rockchip_bionic
Commits
79260746
Commit
79260746
authored
14 years ago
by
David 'Digit' Turner
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Download
Plain Diff
Merge "libc: memmove(): non-overlapping block optim." into gingerbread
parents
032a7135
80fba9a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
libc/string/memmove.c
libc/string/memmove.c
+5
-1
No files found.
libc/string/memmove.c
View file @
79260746
...
...
@@ -31,7 +31,11 @@ void *memmove(void *dst, const void *src, size_t n)
{
const
char
*
p
=
src
;
char
*
q
=
dst
;
if
(
__builtin_expect
(
q
<
p
,
1
))
{
/* we can use highgly-optimized memcpy() if the destination
* is before the source, or if the two blocks are non-overlapping
*/
if
(
__builtin_expect
((
q
<
p
||
(
q
-
p
)
<=
(
ptrdiff_t
)
n
),
1
))
{
return
memcpy
(
dst
,
src
,
n
);
}
else
{
#define PRELOAD_DISTANCE 64
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment