/system/memory/libdmabufheap/tests/ |
D | dmabuf_heap_test.cpp | 98 int ret = 0, map_fd = -1; in TEST_F() local 100 map_fd = allocator->Alloc(kDmabufSystemHeapName, kAllocSizeInBytes); in TEST_F() 101 ASSERT_GE(map_fd, 0); in TEST_F() 105 ptr = mmap(NULL, kAllocSizeInBytes, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 108 ret = allocator->CpuSyncStart(map_fd, kSyncWrite); in TEST_F() 113 ret = allocator->CpuSyncEnd(map_fd); in TEST_F() 117 fds[i] = map_fd; in TEST_F() 124 map_fd = allocator->Alloc(kDmabufSystemHeapName, kAllocSizeInBytes); in TEST_F() 125 ASSERT_GE(map_fd, 0); in TEST_F() 128 ptr = mmap(NULL, kAllocSizeInBytes, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F() [all …]
|
/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/bpf/libbpf_android/include/bpf/ |
D | BpfUtils.h | 77 inline int writeToMapEntry(const base::unique_fd& map_fd, const void* key, const void* value, in writeToMapEntry() argument 80 .map_fd = static_cast<__u32>(map_fd.get()), in writeToMapEntry() 87 inline int findMapEntry(const base::unique_fd& map_fd, const void* key, void* value) { in findMapEntry() argument 89 .map_fd = static_cast<__u32>(map_fd.get()), in findMapEntry() 95 inline int deleteMapEntry(const base::unique_fd& map_fd, const void* key) { in deleteMapEntry() argument 97 .map_fd = static_cast<__u32>(map_fd.get()), in deleteMapEntry() 102 inline int getNextMapKey(const base::unique_fd& map_fd, const void* key, void* next_key) { in getNextMapKey() argument 104 .map_fd = static_cast<__u32>(map_fd.get()), in getNextMapKey() 110 inline int getFirstMapKey(const base::unique_fd& map_fd, void* firstKey) { in getFirstMapKey() argument 111 return getNextMapKey(map_fd, NULL, firstKey); in getFirstMapKey() [all …]
|
D | BpfMap.h | 53 int map_fd = mapRetrieve(pathname, flags); variable 54 if (map_fd >= 0) mMapFd.reset(map_fd); 61 int map_fd = createMap(map_type, sizeof(Key), sizeof(Value), max_entries, map_flags); variable 62 if (map_fd >= 0) mMapFd.reset(map_fd);
|
/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/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 | 867 std::string getMapStatus(const base::unique_fd& map_fd, const char* path) { in getMapStatus() argument 868 if (map_fd.get() < 0) { in getMapStatus()
|