pmemset API version 1.0

The PMDK repository on GitHub is the ultimate source of information on PMDK from release 2.0! For all questions and to submit eventual issues please follow to that repository. The PMDK documentation collected here should be valid up to the 1.13.1 release but is maintained only on a best-effort basis and may not reflect the latest state of the art.

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmemset_new(), pmemset_delete() - allocate and free a structure for a pmemset object

SYNOPSIS

#include <libpmemset.h>

struct pmemset;
struct pmemset_config;
int pmemset_new(struct pmemset **set, struct pmemset_config *cfg);
int pmemset_delete(struct pmemset **set);

DESCRIPTION

The pmemset_new() function creates a new set by allocating and initializing set structure, pmemset, and returns it through the pointer in *set. Configuration data, passed by the *cfg, is copied into the set structure.

The pmemset_delete() function frees *set returned by pmemset_new() and sets *set to NULL. If *set is NULL, no operation is performed.

RETURN VALUE

The pmemset_new() function returns 0 on success or a negative error code on failure. pmemset_new() sets *set variable to NULL on failure.

The pmemset_delete() function always returns 0.

ERRORS

pmemset_new() can fail with the following error:

  • -ENOMEM - out of memory

SEE ALSO

errno(3), pmemset_config_new(3), libpmemset(7) and http://pmem.io

The contents of this web site and the associated GitHub repositories are BSD-licensed open source.