More detailed information about unsafe shutdown detection and unsafe shutdown count
and can be found in the [libpmem2_unsafe_shutdown](https://pmem.io/pmdk/manpages/linux/master/libpmem2/libpmem2_unsafe_shutdown.7.html) man page.
# GRANULARITY #
The **libpmem2** library introduces the concept of granularity through which you
...
...
@@ -79,6 +154,8 @@ set this value to **PMEM2_GRANULARITY_PAGE**.
# CAVEATS #
**libpmem2** relies on the library destructor being called from the main thread. For this reason, all functions that might trigger destruction (e.g. dlclose(3)) should be called in the main thread. Otherwise some of the resources associated with that thread might not be cleaned up properly.
# ENVIRONMENT #
**libpmem2** can change its default behavior based on the following
...
...
@@ -193,6 +270,18 @@ written to *stderr*.
# EXAMPLE #
The following example uses **libpmem2** to flush changes made to raw,
memory-mapped persistent memory.
>WARNING:
There is nothing transactional about the *persist* from **pmem2_get_persist_fn**(3)
call in this example. Interrupting the program may result in a partial write to pmem.
Use a transactional library such as **libpmemobj**(7) to avoid torn updates.