Вопрос

Where is definition of memcpy function located? It is declared in wchar.h where I can find that

/* memcpy and memmove are defined just for use in wmemcpy and wmemmove */

then I find only the wmemcpy_s.c on my computer and there is a definition of wmemcpy_s function there, which uses wmemcpy function which uses memcpy.

Where is the definition of memcpy?

Это было полезно?

Решение 2

C:\ProgramFiles\MicrosoftVisualStudio10\VC\crt\src\memcpy.c

Другие советы

It depends on compiler being used. For gcc, a generic memcpy is located at libgcc.a, usually a rep movsb. if optimization is turned on the compiler will try to emit inline version instead, and there are multiple versions of built-in memcpy that is optimized for different situations.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top