Error Set MincoreError [src]

Errors

InvalidAddress

vec points to an invalid address.

InvalidSyscall

addr is not page-aligned.

MincoreUnavailable

The mincore syscall is not available on this version and configuration of this UNIX-like kernel.

OutOfMemory

One of the following:

  • length is greater than user space TASK_SIZE - addr
  • addr + length contains unmapped memory
SystemResources

A kernel resource was temporarily unavailable.

Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Source

pub const MincoreError = error{ /// A kernel resource was temporarily unavailable. SystemResources, /// vec points to an invalid address. InvalidAddress, /// addr is not page-aligned. InvalidSyscall, /// One of the following: /// * length is greater than user space TASK_SIZE - addr /// * addr + length contains unmapped memory OutOfMemory, /// The mincore syscall is not available on this version and configuration /// of this UNIX-like kernel. MincoreUnavailable, } || UnexpectedError