Persistent allocator design - fragmentation

Persistent allocator design - fragmentation

Implementing a memory allocator is a balance between numerous properties with the two most important being time and space constraints. Making the malloc/free routines reasonably fast is a must for the implementation to be considered usable at all. The algorithm also mustn’t waste excessive …

Read More
How to emulate Persistent Memory

How to emulate Persistent Memory

Data allocated with PMDK is put to the virtual memory address space, and concrete ranges are relying on result of mmap(2) operation performed on the user defined files. Such files can exist on any storage media, however data consistency assurance embedded within PMDK requires frequent …

Read More
C++ bindings for libpmemobj (part 0)

C++ bindings for libpmemobj (part 0)

Our goal for the C pmemobj library was to make a fully featured implementation of persistent memory programming model without modifying the compiler. It’s meant for authors of very low-level system software and language creators. It’s not particularly pretty nor easy to use. The amount …

Read More
C++ bindings for libpmemobj (part 1) - pmem resident variables

C++ bindings for libpmemobj (part 1) - pmem resident variables

One of the biggest hurdles and error prone things about our C API is that the user has to manually keep track of modifications to the persistent memory resident variables while in a transaction. A special semi-transparent template property class has been implemented to automatically add variable …

Read More
C++ bindings for libpmemobj (part 2) - persistent smart pointer

C++ bindings for libpmemobj (part 2) - persistent smart pointer

In our C API the programmer has to deal with custom pointers represented by the PMEMoid structure. Thanks to some macro magic we made it so that those PMEMoids are somewhat usable. C++ allows us to evolve this concept. pmem::obj::persistent_ptr Almost everyone who ever touched a C++ code knows the …

Read More