1PMEM2_CONFIG_SET_OFFSET(3) PMDK Programmer's Manual PMEM2_CONFIG_SET_OFFSET(3)
2
3
4

NAME

6       pmem2_config_set_offset() - set offset in the pmem2_config structure
7

SYNOPSIS

9              #include <libpmem2.h>
10
11              struct pmem2_config;
12              int pmem2_config_set_offset(struct pmem2_config *config, size_t offset);
13

DESCRIPTION

15       The pmem2_config_set_offset() function configures the offset which will
16       be used to map the contents from the specified location of the  source.
17       *config  should  be already initialized, please see pmem2_config_new(3)
18       for details.  The must be a multiple of the alignment required for  the
19       config.   The  alignment requirements are specific to a data source. To
20       retrieve the alignment required for specific instance of pmem2_source**
21       use pmem2_source_alignment(3).  By default, the offset is 0.
22

RETURN VALUE

24       The  pmem2_config_set_offset() function returns 0 on success or a nega‐
25       tive error code on failure.
26

ERRORS

28       The pmem2_config_set_offset() can fail with the following errors:
29
30PMEM2_E_OFFSET_OUT_OF_RANGE  -  argument  out  of  range,  offset  is
31         greater than INT64_MAX
32

SEE ALSO

34       libpmem2(7),       pmem2_source_alignment(3),      pmem2_config_new(3),
35       pmem2_map_new(3), sysconf(3) and <https://pmem.io>
36
37
38
39PMDK - pmem2 API version 1.0      2021-07-22        PMEM2_CONFIG_SET_OFFSET(3)
Impressum