objective c - Some C functions in iOS duplicated as #define -


c functions memcpy , memset available c functions #define in ios:

for example #define memcpy, under hood, is:

#define memcpy(dest, src, len)                  \ ((__darwin_obsz0 (dest) != (size_t) -1)             \  ? __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))   \  : __inline_memcpy_chk (dest, src, len)) 
  1. i gather there memory checking here can shed additional details on why better memcpy alone (where value added)?

  2. more importantly, when use which?

unless #undef macro, or call (memcpy)(args...), use macro variant.

i use maco - it's intended fast , efficient, , work expect.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -