PMEM2_SOURCE_ALIGNMENT(3) | PMDK Programmer's Manual | PMEM2_SOURCE_ALIGNMENT(3) |
pmem2_source_alignment() - returns data source alignment
#include <libpmem2.h> struct pmem2_source; int pmem2_source_alignment(const struct pmem2_source *source, size_t *alignment);
The pmem2_source_alignment() function retrieves the alignment of offset and length needed for pmem2_map_new(3) to succeed. The alignment is stored in *alignment.
The pmem2_source_alignment() function returns 0 on success. If the function fails, the *alignment variable is left unmodified and a negative error code is returned.
The pmem2_source_alignment() can fail with the following errors:
On all systems:
on Linux:
On FreeBSD:
errno(3), fstat(2), realpath(3), read(2), strtoull(3), pmem2_config_new(3), pmem2_source_from_handle(3), pmem2_source_from_fd(3), libpmem2(7) and <https://pmem.io>
2022-08-25 | PMDK - pmem2 API version 1.0 |