Lines Matching refs:mapping
95 char* mapping = static_cast<char*>( in TEST() local
97 ASSERT_NE(MAP_FAILED, mapping); in TEST()
98 memset(mapping, 0x4c, 4 * getpagesize()); in TEST()
99 ASSERT_EQ(0, mprotect(mapping + getpagesize(), getpagesize(), PROT_NONE)); in TEST()
100 ASSERT_EQ(0, munmap(mapping + 3 * getpagesize(), getpagesize())); in TEST()
112 ASSERT_EQ(0, munmap(mapping, 3 * getpagesize())); in TEST()
120 remote.Read(reinterpret_cast<uint64_t>(mapping + getpagesize() - 1024), dst.data(), 4096); in TEST()
129 remote.Read(reinterpret_cast<uint64_t>(mapping + 3 * getpagesize() - 1024), dst.data(), 4096); in TEST()
220 void* mapping = in TEST() local
222 ASSERT_NE(MAP_FAILED, mapping); in TEST()
223 memset(mapping, 0xFF, 3 * page_size); in TEST()
224 ASSERT_EQ(0, mprotect(static_cast<char*>(mapping) + page_size, page_size, PROT_NONE)); in TEST()
234 ASSERT_EQ(0, munmap(mapping, 3 * page_size)); in TEST()
240 size_t read_size = remote.Read(reinterpret_cast<uint64_t>(mapping), dst.data(), page_size * 3); in TEST()
255 void* mapping = in TEST() local
257 ASSERT_NE(MAP_FAILED, mapping); in TEST()
258 memset(mapping, 0xFF, 3 * page_size); in TEST()
259 ASSERT_EQ(0, munmap(static_cast<char*>(mapping) + page_size, page_size)); in TEST()
270 ASSERT_EQ(0, munmap(mapping, page_size)); in TEST()
271 ASSERT_EQ(0, munmap(static_cast<char*>(mapping) + 2 * page_size, page_size)); in TEST()
277 size_t read_size = remote.Read(reinterpret_cast<uint64_t>(mapping), dst.data(), page_size * 3); in TEST()
293 void* mapping = in TEST() local
295 ASSERT_NE(MAP_FAILED, mapping); in TEST()
296 memset(mapping, 0xFC, 2 * page_size); in TEST()
297 ASSERT_EQ(0, mprotect(static_cast<char*>(mapping), page_size, PROT_NONE)); in TEST()
308 ASSERT_EQ(0, munmap(mapping, 2 * page_size)); in TEST()
316 size_t bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping), &value, sizeof(value)); in TEST()
319 …bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping) + page_size, &value, sizeof(value)); in TEST()
322 bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping), &value, sizeof(value)); in TEST()
330 bytes = remote_readv.Read(reinterpret_cast<uint64_t>(mapping) + page_size, &value, sizeof(value)); in TEST()
333 bytes = remote_readv.Read(reinterpret_cast<uint64_t>(mapping), &value, sizeof(value)); in TEST()
335 bytes = remote_readv.Read(reinterpret_cast<uint64_t>(mapping) + page_size, &value, sizeof(value)); in TEST()