68
Chapter 4 describes the requirements for applications using persistent memory, and
Chapter 6 describes libpmem in more depth.
When to use it?
Use libpmem when modifying an existing application that already uses memorymapped I/O. Such applications can leverage the persistent memory synchronization
primitives, such as user space flushing, to replace msync(), thus reducing the kernel
overhead.
Also use libpmem when you want to build everything from the ground up. It
supports implementation of low-level persistent data structures with custom memory
management and recovery logic.
libpmemobj
What is it?
libpmemobj is a C library that provides a transactional object store, with a manual
dynamic memory allocator, transactions, and general facilities for persistent memory
programming. This library solves many of the commonly encountered algorithmic and
data structure problems when programming for persistent memory. Chapter 7 describes
this library in detail.
When to use it?
Use libpmemobj when the programming language of choice is C and when you need
flexibility in terms of data structures design but can use a general-purpose memory
allocator and transactions.
libpmemobj-cpp
What is it?
libpmemobj-cpp, also known as libpmemobj++, is a C++ header-only library that uses
the metaprogramming features of C++ to provide a simpler, less error-prone interface to
libpmemobj. It enables rapid development of persistent memory applications by reusing
many concepts C++ programmers are already familiar with, such as smart pointers and
closure-based transactions.
This library also ships with custom-made, STL-compatible data structures and
containers, so that application developers do not have to reinvent the basic algorithms
for persistent memory.
Chapter 5 IntroduCIng the persIstent MeMory developMent KIt
Chapter 4 describes the requirements for applications using persistent memory, and
Chapter 6 describes libpmem in more depth.
When to use it?
Use libpmem when modifying an existing application that already uses memorymapped I/O. Such applications can leverage the persistent memory synchronization
primitives, such as user space flushing, to replace msync(), thus reducing the kernel
overhead.
Also use libpmem when you want to build everything from the ground up. It
supports implementation of low-level persistent data structures with custom memory
management and recovery logic.
libpmemobj
What is it?
libpmemobj is a C library that provides a transactional object store, with a manual
dynamic memory allocator, transactions, and general facilities for persistent memory
programming. This library solves many of the commonly encountered algorithmic and
data structure problems when programming for persistent memory. Chapter 7 describes
this library in detail.
When to use it?
Use libpmemobj when the programming language of choice is C and when you need
flexibility in terms of data structures design but can use a general-purpose memory
allocator and transactions.
libpmemobj-cpp
What is it?
libpmemobj-cpp, also known as libpmemobj++, is a C++ header-only library that uses
the metaprogramming features of C++ to provide a simpler, less error-prone interface to
libpmemobj. It enables rapid development of persistent memory applications by reusing
many concepts C++ programmers are already familiar with, such as smart pointers and
closure-based transactions.
This library also ships with custom-made, STL-compatible data structures and
containers, so that application developers do not have to reinvent the basic algorithms
for persistent memory.
Chapter 5 IntroduCIng the persIstent MeMory developMent KIt
