Home
last modified time | relevance | path

Searched refs:mem_fd (Results 1 – 7 of 7) sorted by relevance

/third_party/mesa3d/src/util/
Dos_memory_fd.c105 int mem_fd; in os_malloc_aligned_fd() local
122 mem_fd = os_create_anonymous_file(alloc_size, fd_name); in os_malloc_aligned_fd()
124 if(mem_fd < 0) in os_malloc_aligned_fd()
129 if (fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL) != 0) in os_malloc_aligned_fd()
133 ptr = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, 0); in os_malloc_aligned_fd()
158 *fd = mem_fd; in os_malloc_aligned_fd()
162 close(mem_fd); in os_malloc_aligned_fd()
/third_party/mesa3d/src/intel/tools/
Daub_mem.c167 ASSERTED int ftruncate_res = ftruncate(mem->mem_fd, mem->mem_fd_len += 4096); in ensure_phys_mem()
171 mem->mem_fd, new_mem->fd_offset); in ensure_phys_mem()
302 MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset); in aub_mem_get_ggtt_bo()
367 MAP_SHARED | MAP_FIXED, mem->mem_fd, phys_mem->fd_offset); in aub_mem_get_ppgtt_bo()
383 mem->mem_fd = os_create_anonymous_file(0, "phys memory"); in aub_mem_init()
385 return mem->mem_fd != -1; in aub_mem_init()
391 if (mem->mem_fd == -1) in aub_mem_fini()
406 close(mem->mem_fd); in aub_mem_fini()
407 mem->mem_fd = -1; in aub_mem_fini()
Daub_mem.h43 int mem_fd; member
/third_party/ltp/testcases/kernel/security/dirtyc0w_shmem/
Ddirtyc0w_shmem_child.c34 static int mem_fd; variable
85 pwrite(mem_fd, str, strlen(str), (uintptr_t) map); in write_thread_fn()
223 mem_fd = SAFE_OPEN("/proc/self/mem", O_RDWR); in main()
/third_party/skia/third_party/externals/angle2/util/posix/
Dcrash_handler_posix.cpp305 int mem_fd(HANDLE_EINTR(open("/proc/self/mem", O_RDONLY | O_CLOEXEC)));
306 if (mem_fd == -1)
309 auto safe_memcpy = [&mem_fd](void *dst, uintptr_t src, size_t size) {
310 return HANDLE_EINTR(pread(mem_fd, dst, size, src)) == ssize_t(size);
359 close(mem_fd);
/third_party/mesa3d/src/drm-shim/
Ddevice.c89 shim_device.mem_fd = memfd_create("shim mem", MFD_CLOEXEC); in drm_shim_device_init()
90 assert(shim_device.mem_fd != -1); in drm_shim_device_init()
92 ASSERTED int ret = ftruncate(shim_device.mem_fd, SHIM_MEM_SIZE); in drm_shim_device_init()
432 return mmap(NULL, length, prot, flags, shim_device.mem_fd, bo->mem_addr); in drm_shim_mmap()
Ddrm_shim.h51 int mem_fd; member