Lines Matching refs:ptr
110 void *ptr; in qemu_memfd_alloc() local
133 ptr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, mfd, 0); in qemu_memfd_alloc()
134 if (ptr == MAP_FAILED) { in qemu_memfd_alloc()
139 return ptr; in qemu_memfd_alloc()
149 void qemu_memfd_free(void *ptr, size_t size, int fd) in qemu_memfd_free() argument
151 if (ptr) { in qemu_memfd_free()
152 munmap(ptr, size); in qemu_memfd_free()
178 void *ptr; in qemu_memfd_alloc_check() local
181 ptr = qemu_memfd_alloc("test", 4096, 0, &fd, NULL); in qemu_memfd_alloc_check()
182 memfd_check = ptr ? MEMFD_OK : MEMFD_KO; in qemu_memfd_alloc_check()
183 qemu_memfd_free(ptr, 4096, fd); in qemu_memfd_alloc_check()