fn mmap(ptr: ?[*]align(mem.page_size) u8, length: usize, prot: u32, flags: u32, fd: fd_t, offset: u64) MMapError![]align(mem.page_size) u8

Map files or devices into memory. length does not need to be aligned. Use of a mapped region can result in these signals:

  • SIGSEGV - Attempted write into a region mapped as read-only.
  • SIGBUS - Attempted access to a portion of the buffer that does not correspond to the file

Parameters

ptr: ?[*]align(mem.page_size) u8,
length: usize,
prot: u32,
flags: u32,
fd: fd_t,
offset: u64,