Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top