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_persist() - persist data from the range

SYNOPSIS

#include <libpmemset.h>

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

DESCRIPTION

The pmemset_persist() function efficiently persists data from set in the range [ptr, ptr + size]. It works on either persistent memory or a memory mapped file on traditional storage. The pmemset_persist() function is combination of pmemset_flush(3) and pmemset_drain(3) functions and can be used interchangeably:

	struct pmemset *set;

	...

	/* save stores durably on underlying medium */
	pmemset_persist(set, addr, len);

is an equivalent of:

	struct pmemset *set;

	...

	/* flush the processor caches */
	pmemset_flush(set, addr, len);

	/* wait for any pmem stores to drain from HW buffers */
	pmemset_drain(set);

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

RETURN VALUE

The pmemset_persist() function always returns 0.

SEE ALSO

pmem2_get_persist_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.