v
Persistent Libraries ��������������������������������������������������������������������������������������������������������������������� 67
libpmem �������������������������������������������������������������������������������������������������������������������������������� 67
libpmemobj ���������������������������������������������������������������������������������������������������������������������������� 68
libpmemobj-cpp �������������������������������������������������������������������������������������������������������������������� 68
libpmemkv ����������������������������������������������������������������������������������������������������������������������������� 69
libpmemlog ���������������������������������������������������������������������������������������������������������������������������� 69
libpmemblk ���������������������������������������������������������������������������������������������������������������������������� 69
Tools and Command Utilities ������������������������������������������������������������������������������������������������������� 70
pmempool ������������������������������������������������������������������������������������������������������������������������������ 70
pmemcheck ��������������������������������������������������������������������������������������������������������������������������� 70
pmreorder ������������������������������������������������������������������������������������������������������������������������������ 71
Summary������������������������������������������������������������������������������������������������������������������������������������� 71
Chapter 6: libpmem: Low-Level Persistent Memory Support ��������������������������������� 73
Using the Library ������������������������������������������������������������������������������������������������������������������������� 74
Mapping a File ���������������������������������������������������������������������������������������������������������������������������� 75
Copying to Persistent Memory ���������������������������������������������������������������������������������������������������� 76
Separating the Flush Steps ��������������������������������������������������������������������������������������������������������� 77
Summary������������������������������������������������������������������������������������������������������������������������������������� 79
Chapter 7: libpmemobj: A Native Transactional Object Store ��������������������������������� 81
What is libpmemobj? ������������������������������������������������������������������������������������������������������������������ 81
Why not malloc( )? ����������������������������������������������������������������������������������������������������������������������� 82
Grouping Operations ������������������������������������������������������������������������������������������������������������������� 83
Memory Pools ����������������������������������������������������������������������������������������������������������������������������� 83
Creating Memory Pools ��������������������������������������������������������������������������������������������������������� 83
Pool Object Pointer (POP) and the Root Object ���������������������������������������������������������������������� 87
Opening and Reading from Memory Pools ���������������������������������������������������������������������������� 88
Memory Poolsets ������������������������������������������������������������������������������������������������������������������������ 90
Concatenated Poolsets ���������������������������������������������������������������������������������������������������������� 90
Replica Poolsets �������������������������������������������������������������������������������������������������������������������� 91
Managing Memory Pools and Poolsets ��������������������������������������������������������������������������������������� 92
Table of ConTenTs
Persistent Libraries ��������������������������������������������������������������������������������������������������������������������� 67
libpmem �������������������������������������������������������������������������������������������������������������������������������� 67
libpmemobj ���������������������������������������������������������������������������������������������������������������������������� 68
libpmemobj-cpp �������������������������������������������������������������������������������������������������������������������� 68
libpmemkv ����������������������������������������������������������������������������������������������������������������������������� 69
libpmemlog ���������������������������������������������������������������������������������������������������������������������������� 69
libpmemblk ���������������������������������������������������������������������������������������������������������������������������� 69
Tools and Command Utilities ������������������������������������������������������������������������������������������������������� 70
pmempool ������������������������������������������������������������������������������������������������������������������������������ 70
pmemcheck ��������������������������������������������������������������������������������������������������������������������������� 70
pmreorder ������������������������������������������������������������������������������������������������������������������������������ 71
Summary������������������������������������������������������������������������������������������������������������������������������������� 71
Chapter 6: libpmem: Low-Level Persistent Memory Support ��������������������������������� 73
Using the Library ������������������������������������������������������������������������������������������������������������������������� 74
Mapping a File ���������������������������������������������������������������������������������������������������������������������������� 75
Copying to Persistent Memory ���������������������������������������������������������������������������������������������������� 76
Separating the Flush Steps ��������������������������������������������������������������������������������������������������������� 77
Summary������������������������������������������������������������������������������������������������������������������������������������� 79
Chapter 7: libpmemobj: A Native Transactional Object Store ��������������������������������� 81
What is libpmemobj? ������������������������������������������������������������������������������������������������������������������ 81
Why not malloc( )? ����������������������������������������������������������������������������������������������������������������������� 82
Grouping Operations ������������������������������������������������������������������������������������������������������������������� 83
Memory Pools ����������������������������������������������������������������������������������������������������������������������������� 83
Creating Memory Pools ��������������������������������������������������������������������������������������������������������� 83
Pool Object Pointer (POP) and the Root Object ���������������������������������������������������������������������� 87
Opening and Reading from Memory Pools ���������������������������������������������������������������������������� 88
Memory Poolsets ������������������������������������������������������������������������������������������������������������������������ 90
Concatenated Poolsets ���������������������������������������������������������������������������������������������������������� 90
Replica Poolsets �������������������������������������������������������������������������������������������������������������������� 91
Managing Memory Pools and Poolsets ��������������������������������������������������������������������������������������� 92
Table of ConTenTs
