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
Loading
Please sign in to comment