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))
i gather there memory checking here can shed additional details on why better memcpy alone (where value added)?
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
Post a Comment