/system/core/libcutils/tests/ |
D | AshmemTest.cpp | 58 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST() 61 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, ®ion1)); in TEST() 69 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ, ®ion2)); in TEST() 80 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST() 83 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, ®ion1)); in TEST() 90 void *region2 = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in TEST() 104 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, size, PROT_READ | PROT_WRITE, ®ion2)); in TEST() 117 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ | PROT_WRITE)); in TEST() 118 ASSERT_NO_FATAL_FAILURE(TestMmap(fd, dataSize, PROT_READ | PROT_WRITE, ®ion, holeSize)); in TEST() 171 ASSERT_NO_FATAL_FAILURE(TestCreateRegion(size, fd, PROT_READ)); in TEST() [all …]
|
/system/media/audio_utils/tests/ |
D | fifo_multiprocess.cpp | 47 sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, MAP_SHARED, frontFd, (off_t) 0); in main() 52 sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, MAP_SHARED, rearFd, (off_t) 0); in main() 56 int16_t *data = (int16_t *) mmap(NULL, sizeof(audio_utils_fifo_index), PROT_READ | PROT_WRITE, in main() 76 ok = ashmem_set_prot_region(frontFd, PROT_READ); in main() 80 sizeof(audio_utils_fifo_index), PROT_READ, MAP_SHARED | MAP_FIXED, frontFd, in main() 139 ok = ashmem_set_prot_region(rearFd, PROT_READ); in main() 143 sizeof(audio_utils_fifo_index), PROT_READ, MAP_SHARED | MAP_FIXED, rearFd, in main() 150 ok = ashmem_set_prot_region(dataFd, PROT_READ); in main() 153 data = (int16_t *) mmap((char *) data + pageSize * 8, BUFFER_SIZE, PROT_READ, in main()
|
/system/core/libunwindstack/tests/ |
D | MapsTest.cpp | 44 ASSERT_EQ(PROT_READ, it->flags); in TEST() 62 ASSERT_EQ(PROT_READ | PROT_WRITE | PROT_EXEC, it->flags); in TEST() 84 ASSERT_EQ(PROT_READ | PROT_WRITE, it->flags); in TEST() 90 ASSERT_EQ(PROT_READ | PROT_WRITE, it->flags); in TEST() 96 ASSERT_EQ(PROT_READ | PROT_WRITE, it->flags); in TEST() 112 ASSERT_EQ(PROT_READ | PROT_WRITE, it->flags); in TEST() 118 ASSERT_EQ(PROT_READ | PROT_WRITE, it->flags); in TEST() 165 ASSERT_EQ(PROT_READ | PROT_EXEC, it->flags); in TEST() 171 ASSERT_EQ(PROT_READ | PROT_EXEC, it->flags); in TEST() 177 ASSERT_EQ(PROT_READ | PROT_EXEC, it->flags); in TEST() [all …]
|
/system/core/libion/tests/ |
D | invalid_values_test.cpp | 121 int ret = ion_map(0, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd); in TEST_F() 124 EXPECT_EQ(-EBADF, ion_map(-1, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 126 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, 0, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 128 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_badHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 130 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 0, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 134 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, -1, &ptr, &map_fd)); in TEST_F() 136 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, NULL, &map_fd)); in TEST_F() 138 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, NULL)); in TEST_F()
|
D | map_test.cpp | 42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F() 70 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 92 … ptr = (unsigned char *)mmap(NULL, PAGE_SIZE * 2, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 100 …ptr = (unsigned char *)mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, PAGE_SIZE… in TEST_F() 126 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 152 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
|
D | exit_test.cpp | 102 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 125 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 149 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 172 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 196 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 219 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
|
D | device_test.cpp | 149 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 184 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 213 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 246 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 275 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 310 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 339 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 374 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 404 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 439 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() [all …]
|
D | formerly_valid_handle_test.cpp | 55 ASSERT_EQ(-EINVAL, ion_map(m_ionFd, m_handle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
|
/system/core/libbacktrace/include/backtrace/ |
D | BacktraceMap.h | 25 #define PROT_READ 0x1 macro 74 bool IsReadable(uintptr_t pc) { return GetFlags(pc) & PROT_READ; } in IsReadable()
|
/system/core/libbacktrace/ |
D | BacktracePtrace.cpp | 57 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in ReadWord() 72 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read()
|
D | BacktraceCurrent.cpp | 46 if (BacktraceMap::IsValid(map) && map.flags & PROT_READ) { in ReadWord() 59 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read()
|
D | BacktraceMap.cpp | 80 map->flags |= PROT_READ;
|
/system/bt/osi/test/ |
D | wakelock_test.cc | 104 mmap(nullptr, lock_stat.st_size, PROT_READ, MAP_PRIVATE, lock_fd, 0); in IsFileWakeLockAcquired() 106 void* unlock_file = mmap(nullptr, unlock_stat.st_size, PROT_READ, in IsFileWakeLockAcquired()
|
/system/extras/kexec_tools/ |
D | kexecload.c | 135 … atag_buffer = (char *) mmap(NULL, atag_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, atag_file, 0); in main() 136 …zimage_buffer = (char *) mmap(NULL, zimage_size, PROT_READ, MAP_POPULATE | MAP_PRIVATE, zimage_fil… in main()
|
/system/core/debuggerd/libdebuggerd/test/ |
D | tombstone_test.cpp | 140 map.flags = PROT_READ; in TEST_F() 217 map.flags = PROT_READ; in TEST_F() 238 map.flags = PROT_READ | PROT_WRITE | PROT_EXEC; in TEST_F() 292 map.flags = PROT_READ | PROT_WRITE | PROT_EXEC; in TEST_F() 350 map.flags = PROT_READ | PROT_WRITE | PROT_EXEC; in TEST_F() 408 map.flags = PROT_READ | PROT_WRITE | PROT_EXEC; in TEST_F() 464 map.flags = PROT_READ | PROT_WRITE | PROT_EXEC; in TEST_F()
|
/system/libhidl/transport/memory/1.0/default/ |
D | AshmemMapper.cpp | 49 void* data = mmap(0, mem.size(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in mapMemory()
|
/system/extras/tests/memtest/ |
D | memtest.cpp | 139 void* addr1 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in madvise_test() 158 void* addr2 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in madvise_test()
|
/system/extras/tests/pagingtest/ |
D | mmap_test.c | 25 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in mmap_test()
|
D | thrashing_test.c | 44 bufs[i] = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fds[i], 0); in thrashing_test()
|
D | pageinout_test.c | 37 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0); in pageinout_test()
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | utils.c | 42 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy()
|
/system/core/libion/ |
D | ion_test.c | 34 int prot = PROT_READ | PROT_WRITE; 246 map_flags |= strstr(optarg, "PROT_READ") ? PROT_READ: 0; in main()
|
/system/core/debuggerd/crasher/ |
D | crasher.cpp | 140 mmap(nullptr, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in leak() 279 char* map = reinterpret_cast<char*>(mmap(nullptr, sizeof(int), PROT_READ | PROT_WRITE, in do_action()
|
/system/extras/memory_replay/ |
D | Pointers.cpp | 35 void* memory = mmap(nullptr, pointers_size_, PROT_READ | PROT_WRITE, in Pointers()
|
/system/core/libmemunreachable/ |
D | PtracerThread.cpp | 43 int prot = PROT_READ | PROT_WRITE; in Stack()
|