.\" Automatically generated by Pandoc 2.0.6 .\" .TH "PMEM2_CONFIG_SET_LENGTH" "3" "2022-08-25" "PMDK - pmem2 API version 1.0" "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[]() \- 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[] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_length\f[]() function configures the length which will be used for mapping. \f[I]*config\f[] should be already initialized, please see \f[B]pmem2_config_new\f[](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[]pmem2_source** use \f[B]pmem2_source_alignment\f[](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[]() function always returns 0. .SH SEE ALSO .PP \f[B]libpmem2\f[](7), \f[B]pmem2_map_new\f[](3), \f[B]pmem2_source_alignment\f[](3), \f[B]pmem2_config_new\f[](3), \f[B]sysconf\f[](3) and \f[B]\f[]