On Wed, 12 Feb 2025 11:21:49 +0800 "11" <caowe...@mucse.com> wrote:
> Hi Stephen, > For memcpy what ever base code or other code all used memcpy not rte_memcpy > ? > Even the memory is malloc from rte_malloc/zmalloc ? > > Regards Wenbo. The documentation doesn't make it clear but rte_memcpy is the same as memcpy. It only exists because for some cases (like older versions of Gcc and differences in alignment assumptions) when running micro benchmarks rte_memcpy was faster. All new code should only use memcpy() unless there is a benchmark test that shows a noticable difference. The reason is that tools like Coverity, Gcc, Clang, and PVS studio all treat memcpy specially and can do checks for access outside of range.