Lines Matching refs:ptr
39 void* ptr; in TEST_F() local
40 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
41 ASSERT_TRUE(ptr != NULL); in TEST_F()
44 memset(ptr, 0xaa, size); in TEST_F()
46 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()
60 unsigned char* ptr; in TEST_F() local
61 ptr = (unsigned char*)mmap(NULL, getpagesize() * 2, PROT_READ | PROT_WRITE, MAP_SHARED, in TEST_F()
63 ASSERT_TRUE(ptr != NULL); in TEST_F()
65 memset(ptr, 0, getpagesize()); in TEST_F()
66 memset(ptr + getpagesize(), 0xaa, getpagesize()); in TEST_F()
68 ASSERT_EQ(0, munmap(ptr, getpagesize() * 2)); in TEST_F()
70 ptr = (unsigned char*)mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, in TEST_F()
72 ASSERT_TRUE(ptr != NULL); in TEST_F()
73 ASSERT_EQ(ptr[0], 0xaa); in TEST_F()
74 ASSERT_EQ(ptr[getpagesize() - 1], 0xaa); in TEST_F()
75 ASSERT_EQ(0, munmap(ptr, getpagesize())); in TEST_F()
93 void* ptr; in TEST_F() local
94 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
95 ASSERT_TRUE(ptr != NULL); in TEST_F()
98 memset(ptr, 0xaa, size); in TEST_F()
100 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()
118 void* ptr; in TEST_F() local
119 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
120 ASSERT_TRUE(ptr != NULL); in TEST_F()
123 memset(ptr, 0xaa, size); in TEST_F()
125 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()