• Home
  • Raw
  • Download

Lines Matching refs:libc

16 use libc::{self, c_int, c_void, read, write};
76 Protection(libc::PROT_NONE) in none()
82 Protection(libc::PROT_READ | libc::PROT_WRITE) in read_write()
88 Protection(libc::PROT_READ) in read()
94 Protection(self.0 | libc::PROT_READ) in set_read()
100 Protection(self.0 | libc::PROT_WRITE) in set_write()
152 libc::MAP_ANONYMOUS | libc::MAP_SHARED | libc::MAP_NORESERVE, in new_protection()
191 libc::MAP_SHARED, in from_fd_offset_protection()
213 libc::MAP_ANONYMOUS | libc::MAP_SHARED | libc::MAP_NORESERVE, in new_protection_fixed()
239 libc::MAP_SHARED | libc::MAP_NORESERVE, in from_fd_offset_protection_fixed()
260 flags |= libc::MAP_FIXED; in try_mmap()
261 addr as *mut libc::c_void in try_mmap()
268 if offset > libc::off_t::max_value() as usize { in try_mmap()
271 (fd.as_raw_fd(), offset as libc::off_t) in try_mmap()
275 let addr = libc::mmap(addr, size, prot, flags, fd, offset); in try_mmap()
276 if addr == libc::MAP_FAILED { in try_mmap()
281 if libc::madvise(addr, size, libc::MADV_DONTDUMP) == -1 { in try_mmap()
309 libc::msync( in msync()
310 self.as_ptr() as *mut libc::c_void, in msync()
312 libc::MS_SYNC, in msync()
563 libc::madvise( in remove_range()
566 libc::MADV_REMOVE, in remove_range()
604 libc::munmap(self.addr as *mut libc::c_void, self.size); in drop()
834 libc::munmap(self.addr as *mut libc::c_void, self.size); in drop()
855 assert_eq!(e.errno(), libc::EINVAL); in map_invalid_size()
866 assert_eq!(e.errno(), libc::EBADF); in map_invalid_fd()
924 let res = MemoryMapping::from_fd_offset(&fd, 4096, (libc::off_t::max_value() as usize) + 1) in from_fd_offset_invalid()