const size_t MaxLen = num_regs * RegSize;
const char *arg = str.c_str();
- memset(regs, 0, MaxLen);
+ std::memset(regs, 0, MaxLen);
size_t len = str.size();
// Touch all buffer pages to ensure they are mapped in the
// page table. This is required in the case of X86_FS, where
// Linux does demand paging.
- memset(buf, 0, sizeof(buf));
+ std::memset(buf, 0, sizeof(buf));
int len;
int offset = 0;
#include <gtest/gtest.h>
+#include <cstring>
#include <sstream>
#include "args.hh"
chunks[i] = chunk_idx++;
// Copy out to the requested buffer.
- memcpy(buffer, ((uint8_t *)chunks) + (chunk_size - at_start), len);
+ std::memcpy(buffer, ((uint8_t *)chunks) + (chunk_size - at_start), len);
// Clean up.
delete [] chunks;
char buf[256 * 1024];
int offset = 0;
- memset(buf, 0, sizeof(buf));
+ std::memset(buf, 0, sizeof(buf));
while (true) {
src.seekg(offset);
if (test_written_data.size() < required_size)
test_written_data.resize(required_size);
- memcpy(test_written_data.data() + offset, buffer, len);
+ std::memcpy(test_written_data.data() + offset, buffer, len);
return len;
}
for (size_t i = 0; i < num_chunks; i++)
*buf32++ = val++;
if (leftovers)
- memcpy(buf32, &val, leftovers);
+ std::memcpy(buf32, &val, leftovers);
// Make sure our new contents are out there.
msync(_buf, _size, MS_SYNC | MS_INVALIDATE);