impl memset and memcpy check