/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 | 117 int map_fd = -1; in TEST_F() local 119 ASSERT_EQ(0, ion_alloc_fd(ionfd, 4096, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 120 ASSERT_GE(map_fd, 0); in TEST_F() 123 ptr = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 129 fds[i] = map_fd; in TEST_F() 137 int map_fd = -1; in TEST_F() local 139 ASSERT_EQ(0, ion_alloc_fd(new_ionfd, 4096, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() 140 ASSERT_GE(map_fd, 0); in TEST_F() 143 ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F() 149 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 | 121 unsigned char** ptr, int* map_fd) { in ion_map() argument 129 if (map_fd == NULL) return -EINVAL; in ion_map() 143 *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);
|