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_map_config_new(), pmemset_map_config_delete() - allocate and free a configuration structure for a map object

SYNOPSIS

#include <libpmemset.h>

struct pmemset;
struct pmemset_map_config;
int pmemset_map_config_new(struct pmemset_map_config **map_cfg);
int pmemset_map_config_delete(struct pmemset_map_config **map_cfg);

DESCRIPTION

The pmemset_map_config_new() function instantiates a new (opaque) configuration structure, pmemset_map_config, which can be used to create new map using pmemset_map(3) function, and returns it through the pointer in *map_cfg.

The pmemset_map_config_new() creates a new map config which instantiates a new struct pmemset_map_config* object describing the future mapping.

Other map config parameters which describe mapping can be set using pmemset_map_config_set_length(3) and pmemset_map_config_set_offset(3) functions.

The pmemset_map_config_delete() function frees *map_cfg returned by pmemset_map_config_new() and sets *map_cfg to NULL.

RETURN VALUE

The pmemset_map_config_new() function returns 0 on success or a negative error code on failure.

The pmemset_map_config_delete() function always returns 0.

ERRORS

The pmemset_map_config_new() can fail with the following errors:

  • -ENOMEM in case of insufficient memory to allocate an instance of struct pmemset_map_config.

SEE ALSO

pmemset_map(3), pmemset_map_config_set_length(3), pmemset_map_config_set_offset(3), libpmemset(7) and http://pmem.io

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