aboutsummaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2018-08-17 14:24:35 +0800
committerJulian Veit <claymore1298@gmail.com>2020-03-13 15:08:13 +0100
commit7789e527153b9bf25ff3ad8ddd47fdb7632b1ed4 (patch)
tree1568b9acbf3138ac1855d8285b9b957775da27bf /libc/malloc_hooks/malloc_hooks.cpp
parent0d289bdc2989281bb9aae61f0de7393bec270f35 (diff)
Fix memmove() with memcpy() optimization
This commit fixes `memmove()` when `count` is less than or equal to 96 and the destination overlaps with the source. The latest generic `memmove()` implementation tail calls `__memcpy()` when `count <= 96`. This assumes `__memcpy()` can handle the overlap case when the input is small. However, the `memcpy()` implementations for kryo and kryo300 do not handle the overlap case. Thus, we can not simply rename `memcpy()` from kryo or kryo300 to `__memcpy()`. Instead, we should copy `memmove()` and `__memcpy()` from generic and apply necessary adaptation. Test: LinkerSmallObjectAllocator::free() error does not occur. Change-Id: I52c949ad438eae36e6a874cd8580eecaeb7ab319
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions