/system/memory/libion/tests/ |
D | map_test.cpp | 34 int map_fd = -1; in TEST_F() local 36 ASSERT_EQ(0, ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 37 ASSERT_GE(map_fd, 0); in TEST_F() 40 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 42 ASSERT_EQ(0, close(map_fd)); in TEST_F() 55 int map_fd = -1; in TEST_F() local 57 ASSERT_EQ(0, ion_alloc_fd(ionfd, getpagesize() * 2, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 58 ASSERT_GE(map_fd, 0); in TEST_F() 62 map_fd, 0); in TEST_F() 70 ptr = (unsigned char*)mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, in TEST_F() [all …]
|
D | exit_test.cpp | 82 int map_fd = -1; in TEST_F() 84 ASSERT_EQ(0, ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 85 ASSERT_GE(map_fd, 0); in TEST_F() 88 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 106 int map_fd = -1; in TEST_F() 108 ASSERT_EQ(0, ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 109 ASSERT_GE(map_fd, 0); in TEST_F() 112 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 132 int map_fd = -1; in TEST_F() 135 ION_FLAG_CACHED, &map_fd)); in TEST_F() [all …]
|
D | allocate_test.cpp | 111 int map_fd = -1; in TEST_F() local 113 ASSERT_EQ(0, ion_alloc_fd(ionfd, 4096, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 114 ASSERT_GE(map_fd, 0); in TEST_F() 117 ptr = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 123 fds[i] = map_fd; in TEST_F() 131 int map_fd = -1; in TEST_F() local 133 ASSERT_EQ(0, ion_alloc_fd(new_ionfd, 4096, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 134 ASSERT_GE(map_fd, 0); in TEST_F() 137 ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F() 143 ASSERT_EQ(0, close(map_fd)); in TEST_F()
|
/system/memory/libdmabufheap/tests/ |
D | dmabuf_heap_test.cpp | 38 int map_fd = allocator->AllocSystem(cpu_access_needed, kAllocSizeInBytes); in DoAlloc() local 39 ASSERT_GE(map_fd, 0); in DoAlloc() 41 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in DoAlloc() 44 int ret = allocator->CpuSyncStart(map_fd, kSyncReadWrite); in DoAlloc() 47 ret = allocator->CpuSyncEnd(map_fd, kSyncReadWrite); in DoAlloc() 51 ASSERT_EQ(0, close(map_fd)); in DoAlloc() 179 int ret = 0, map_fd = -1; in TEST_F() local 181 map_fd = allocator->Alloc(kDmabufSystemHeapName, kAllocSizeInBytes); in TEST_F() 182 ASSERT_GE(map_fd, 0); in TEST_F() 184 void* ptr = mmap(NULL, kAllocSizeInBytes, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() [all …]
|
/system/memory/libion/ |
D | ion_test.c | 75 int fd, map_fd, ret; in ion_map_test() local 83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); in ion_map_test() 98 close(map_fd); in ion_map_test() 105 close(map_fd); in ion_map_test() 109 close(map_fd); in ion_map_test() 110 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd); in ion_map_test()
|
D | ion.c | 114 unsigned char** ptr, int* map_fd) { in ion_map() argument 122 if (map_fd == NULL) return -EINVAL; in ion_map() 136 *map_fd = data.fd; in ion_map()
|
/system/bpf/libbpf_android/include/bpf/ |
D | BpfMap.h | 52 int map_fd = mapRetrieve(pathname, flags); variable 53 if (map_fd >= 0) mMapFd.reset(map_fd); 60 int map_fd = createMap(map_type, sizeof(Key), sizeof(Value), max_entries, map_flags); variable 61 if (map_fd >= 0) mMapFd.reset(map_fd);
|
/system/memory/libion/include/ion/ |
D | ion.h | 40 int flags, off_t offset, unsigned char **ptr, int *map_fd);
|
/system/netd/server/ |
D | TrafficController.cpp | 801 std::string getMapStatus(const base::unique_fd& map_fd, const char* path) { in getMapStatus() argument 802 if (map_fd.get() < 0) { in getMapStatus()
|