ark::mem_fd class

wraps fildes created by memfd_create(2) as an io object

Base classes

class seekable_fd
An io object, denotes a lseek()-able fd as defined in kernel.

Public static functions

static auto create(const string& name, int flags) -> result<mem_fd> noexcept
construct and return an event_fd just like calling memfd_create(2)
static auto create(async_context& ctx, const string& name, int flags) -> result<mem_fd> noexcept
construct and return an event_fd just like calling memfd_create(2), and bind to the given ark::async_context

Constructors, destructors, conversion operators

mem_fd(int fd_int) protected
constructs from int fildes

Function documentation

ark::mem_fd::mem_fd(int fd_int) protected

constructs from int fildes

Parameters
fd_int in must be an fildes opened by memfd_create(2)