memobj_create()

Create memory object handle and allocate its memory

Synopsis:

#include <memobj/alloc.h>
errno_t memobj_create(struct memobj **obj_out, const struct memobj_attr *attr)

Arguments:

obj_out
A pointer to a location where this function, on success, stores a handle to the new memory object.
attr
A pointer to structure describing the requested object attributes.

Library:

libmemobj

Description:

The memobj_create() function creates a memory object handle and allocates its memory.

Returns:

EOK
Success; *obj_out was filled.
EINTR
The call was interrupted by a signal.
EINVAL
Invalid attributes, or an underlying call to resmgr_open_bind() failed.
EEXIST
A uniquely-named shared memory object couldn't be created.
EMFILE
Too many file descriptors are in use by the process, or the number of mapped regions is at its maximum limit (refer to the RLIMIT_AS and RLIMIT_DATA resources for setrlimit()).
ENOMEM
There isn't enough memory, address space, or physically contiguous memory.
ENFILE
Too many shared memory objects are open in the system.
ENOSPC
There isn't enough space to create the shared memory object.
EPERM
The process doesn't have permission to make the necessary shm_ctl() or shm_ctl_special() call.
Page updated: