.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "" "" "2023-05-26" "PMDK - " "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2019, Intel Corporation .SH NAME .PP \f[B]pmem2_config_set_length\f[R]() - set length in the pmem2_config structure .SH SYNOPSIS .IP .nf \f[C] #include struct pmem2_config; int pmem2_config_set_length(struct pmem2_config *config, size_t length); \f[R] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_length\f[R]() function configures the length which will be used for mapping. \f[I]*config\f[R] should be already initialized, please see \f[B]pmem2_config_new\f[R](3) for details. The \f[I]must be a multiple of the alignment required for the data source which will be used for mapping alongside the config. To retrieve the alignment required for specific instance of \f[R]pmem2_source** use \f[B]pmem2_source_alignment\f[R](3). By default, the length is equal to the size of the file that is being mapped. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_length\f[R]() function always returns 0. .SH SEE ALSO .PP \f[B]libpmem2\f[R](7), \f[B]pmem2_map_new\f[R](3), \f[B]pmem2_source_alignment\f[R](3), \f[B]pmem2_config_new\f[R](3), \f[B]sysconf\f[R](3) and \f[B]\f[R]