Modernize memcpy() and memmove() usage.

This CL replaces memcpy() with std::memcpy()
and memmove() with std::memmove(), and #includes
<cstring> in files that use either function.

PiperOrigin-RevId: 306067788
This commit is contained in:
Victor Costan
2020-04-12 00:01:01 +00:00
parent d674348a0c
commit 14bef66290
4 changed files with 37 additions and 33 deletions

View File

@@ -84,7 +84,7 @@ class DataEndingAtUnreadablePage {
CHECK_NE(MAP_FAILED, mem_);
protected_page_ = reinterpret_cast<char*>(mem_) + space_for_string;
char* dst = protected_page_ - size;
memcpy(dst, s.data(), size);
std::memcpy(dst, s.data(), size);
data_ = dst;
size_ = size;
// Make guard page unreadable.