111
© The Author(s) 2020
S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1_8
CHAPTER 8
libpmemobj-cpp:
The Adaptable Language -
C++ and Persistent
Memory
Introduction
The Persistent Memory Development Kit (PMDK) includes several separate libraries;
each is designed with a specific use in mind. The most flexible and powerful one is
libpmemobj. It complies with the persistent memory programming model without
modifying the compiler. Intended for developers of low-level system software and
language creators, the libpmemobj library provides allocators, transactions, and a way
to automatically manipulate objects. Because it does not modify the compiler, its API is
verbose and macro heavy.
To make persistent memory programming easier and less error prone, higherlevel language bindings for libpmemobj were created and included in PMDK. The C++
language was chosen to create new and friendly API to libpmemobj called libpmemobjcpp, which is also referred to as libpmemobj++. C++ is versatile, feature rich, has a
large developer base, and it is constantly being improved with updates to the C++
programming standard.
The main goal for the libpmemobj-cpp bindings design was to focus modifications to
volatile programs on data structures and not on the code. In other words, libpmemobjcpp bindings are for developers, who want to modify volatile applications, provided with
a convenient API for modifying structures and classes with only slight modifications to
functions.
Précédent

- 137/457

Suivant