This question makes it clear that it is safe to call memcpy passing zero as the number of bytes to copy. However, the implementation of Lua avoids doing this, claiming empty memcpy "may be expensive", or at least, is "not that cheap".
I would have thought that calling memcpy with a zero count would be more-or-less free - could it be expensive in certain situations?