avoid calling system memcpy