Function

Sysprofmemfd_create

Declaration [src]

int
sysprof_memfd_create (
  const char* desc
)

Description [src]

Creates a new memfd using the memfd_create syscall if available. Otherwise, a tmpfile is used. Currently, no attempt is made to ensure the tmpfile is on a tmpfs backed mount.

Parameters

desc

Type: const char*

No description available.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: int

An fd if successful; otherwise -1 and errno is set.