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
SEE ALSO

NAME

pmemset_flush() - flushes data from the range

SYNOPSIS

#include <libpmemset.h>

int pmemset_flush(struct pmemset *set, const void *ptr, size_t size);

DESCRIPTION

The pmemset_flush() function efficiently flushes data from set in the range [ptr, ptr + size]. The pmemset_flush() function automatically decides what is the most appropriate mechanism for flushing stores directly to underlying storage. Based on granularity value of the set and available platform, pmemset_flush() will use system API calls such as msync(), fsync() on Linux, or FlushFileBuffers(), FlushViewOfFile() on Windows to flush data. Depending on the architecture and power-fail protected domain, pmemset_flush() function can also call machine instructions for flushing cache lines in more reliably way (e.g., CLWB, CLFLUSHOPT, CLFLUSH for Intel x86_64 architecture).

NOTE: For more detailed information about granularity and possible flushing operation please see GRANULARITY section in the libpmem2(7) man page.

NOTE: In the underlying implementation pmemset_flush() uses pmem2_flush_fn returned by pmemset_get_flush_fn(3), so all flush principles are identical for pmemset_flush() function, and you can find them in the pmem2_get_flush_fn(3) man page.

RETURN VALUE

The pmemset_flush() function always returns 0.

SEE ALSO

pmem2_get_flush_fn(3), libpmemset(7), libpmem2(7), and https://pmem.io

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