179
libvmemcache works by automatically creating a temporary file on a DAX-enabled
file system and memory-mapping it into the application’s virtual address space. The
temporary file is deleted when the program terminates and gives the perception of
volatility. Figure 10-4 shows the application using traditional malloc() to allocate
memory from DRAM and using libvmemcache to memory map a temporary file residing
on a DAX-enabled file system from persistent memory.
Although libmemkind supports different kinds of memory and memory consumption
policies, the underlying allocator is jemalloc, which uses dynamic memory allocation.
Table 10-2 compares the implementation details of libvmemcache and libmemkind.
Figure 10-4. An application using libvmemcache memory-maps a temporary file
from a DAX-enabled file system
Chapter 10 Volatile Use of persistent MeMory
Précédent

- 203/457

Suivant