summaryrefslogtreecommitdiff
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
committerLogan Chien <loganchien@google.com>2018-08-17 18:51:48 +0800
commitc1938294eb1bf7ff93062342d03984ce10a4f2c3 (patch)
tree4e5b4027a1aec65d917226a630844e6325b72a26 /libc/malloc_hooks/malloc_hooks.cpp
parentfcad5eb3a94ef43fd3b652774e9bc92be573eda0 (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