Commit c1938294 authored by Logan Chien's avatar Logan Chien
Browse files

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
parent fcad5eb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment