• Home
  • Raw
  • Download

Lines Matching refs:map

31   void* map = mmap(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);  in TEST()  local
32 ASSERT_NE(MAP_FAILED, map); in TEST()
33 ASSERT_EQ(0, munmap(map, 4096)); in TEST()
37 void* map = mmap64(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); in TEST() local
38 ASSERT_NE(MAP_FAILED, map); in TEST()
39 ASSERT_EQ(0, munmap(map, 4096)); in TEST()
45 void* map = mmap(nullptr, 100, PROT_READ, MAP_SHARED, tf.fd, 1); in TEST() local
46 ASSERT_EQ(MAP_FAILED, map); in TEST()
52 void* map = mmap64(nullptr, 100, PROT_READ, MAP_SHARED, tf.fd, 1); in TEST() local
53 ASSERT_EQ(MAP_FAILED, map); in TEST()
66 void* map = mmap(nullptr, sizeof(STRING_MSG), PROT_READ, MAP_SHARED, tf.fd, 0); in TEST() local
67 ASSERT_NE(MAP_FAILED, map); in TEST()
69 char* data = reinterpret_cast<char*>(map); in TEST()
72 ASSERT_EQ(0, munmap(map, sizeof(STRING_MSG))); in TEST()
81 void* map = mmap(nullptr, sizeof(STRING_MSG), PROT_WRITE, MAP_SHARED, tf.fd, 0); in TEST() local
82 ASSERT_NE(MAP_FAILED, map); in TEST()
85 memcpy(map, STRING_MSG, sizeof(STRING_MSG)); in TEST()
87 ASSERT_EQ(0, munmap(map, sizeof(STRING_MSG))); in TEST()
117 void* map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, pagesize); in TEST() local
118 ASSERT_NE(MAP_FAILED, map); in TEST()
120 char* data = reinterpret_cast<char*>(map); in TEST()
123 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
125 map = mmap(nullptr, pagesize, PROT_READ, MAP_SHARED, tf.fd, 2 * pagesize); in TEST()
126 ASSERT_NE(MAP_FAILED, map); in TEST()
128 data = reinterpret_cast<char*>(map); in TEST()
132 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
153 void* map = mmap(nullptr, pagesize, PROT_WRITE, MAP_SHARED, tf.fd, pagesize); in TEST() local
154 ASSERT_NE(MAP_FAILED, map); in TEST()
157 memcpy(map, NEWPAGE1_MSG, sizeof(NEWPAGE1_MSG)); in TEST()
158 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
161 map = mmap(nullptr, pagesize, PROT_WRITE, MAP_SHARED, tf.fd, 2 * pagesize); in TEST()
162 ASSERT_NE(MAP_FAILED, map); in TEST()
165 memcpy(map, NEWPAGE2_MSG, sizeof(NEWPAGE2_MSG)); in TEST()
166 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
188 void* map = mmap(nullptr, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, tempfile.fd, 0); in TEST() local
189 ASSERT_NE(MAP_FAILED, map); in TEST()
192 ASSERT_EQ(0, posix_madvise(map, pagesize, POSIX_MADV_NORMAL)); in TEST()
193 ASSERT_EQ(0, posix_madvise(map, pagesize, POSIX_MADV_SEQUENTIAL)); in TEST()
194 ASSERT_EQ(0, posix_madvise(map, pagesize, POSIX_MADV_RANDOM)); in TEST()
195 ASSERT_EQ(0, posix_madvise(map, pagesize, POSIX_MADV_WILLNEED)); in TEST()
197 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
206 void* map = mmap(nullptr, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in TEST() local
207 ASSERT_NE(MAP_FAILED, map); in TEST()
209 int* int_ptr = reinterpret_cast<int*>(map); in TEST()
214 ASSERT_EQ(0, posix_madvise(map, pagesize, POSIX_MADV_DONTNEED)); in TEST()
216 int_ptr = reinterpret_cast<int*>(map); in TEST()
221 ASSERT_EQ(0, munmap(map, pagesize)); in TEST()
238 void* map = mmap(nullptr, kPageSize, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in TEST() local
239 ASSERT_NE(MAP_FAILED, map); in TEST()
241 ASSERT_EQ(MAP_FAILED, mremap(map, kPageSize, kHuge, MREMAP_MAYMOVE)); in TEST()
243 ASSERT_EQ(0, munmap(map, kPageSize)); in TEST()
268 void* map = mmap(nullptr, kPageSize, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in TEST() local
269 ASSERT_NE(MAP_FAILED, map); in TEST()
272 mlock(map, kPageSize); in TEST()
274 ASSERT_EQ(0, munmap(map, kPageSize)); in TEST()
281 void* map = mmap(nullptr, kPageSize, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in TEST()
282 ASSERT_NE(MAP_FAILED, map); in TEST()
285 mlock2(map, kPageSize, MLOCK_ONFAULT); in TEST()
287 ASSERT_EQ(0, munmap(map, kPageSize)); in TEST()