# pmul **Repository Path**: mirrors_pmem/pmul ## Basic Information - **Project Name**: pmul - **Description**: PMUL is a Java library that adds PMem programming features to Java’s foreign memory API in JDK 18 - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-28 - **Last Updated**: 2026-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PROJECT NOT UNDER ACTIVE MANAGEMENT # This project will no longer be maintained by Intel. This project has been identified as having known security escapes. Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project. Intel no longer accepts patches to this project. # Persistent Memory Utility Libraries OpenJDK now supports direct access to off-heap memory via the `jdk.incubator.foreign` package. While this package offers basic support for programming with persistent memory, PMUL implements additional features useful for programming with persistent memory.  ## OVERVIEW ## The Persistent Memory Utility Libraries (PMUL) provide access to off-heap persistent memory from Java. PMUL offers heaps of allocatable persistent memory, which can be directly used with the `jdk.incubator.foreign` API. PMUL also offers optional, fail-safe transactions useful in implementing strong data consistency policies. Data stored in PMUL heaps can persist beyond the life of a JVM instance, i.e. across application or system restarts. PMUL uses the Persistent Memory Development Kit (PMDK). For more information on PMDK, please visit http://pmem.io and https://github.com/pmem/pmdk. ## HOW TO BUILD & RUN ## ### PREREQUISITES TO BUILD ### The following are the prerequisites for building this Java library: 1. Linux operating system 2. Persistent Memory Development Kit (PMDK) v1.11 or newer 3. Memkind v1.10 4. Java 18 5. Build tools - `g++` compiler, `CMake` and `Maven` ### PREREQUISITES TO RUN ### This library assumes the availability of hardware persistent memory or emulated persistent memory. Instructions for creating emulated persistent memory are shown below. ### EMULATING PERSISTENT MEMORY ### The preferred way is to create an in-memory DAX file system. This requires Linux kernel 4.2 or greater. Please follow the steps at: http://pmem.io/2016/02/22/pm-emulation.html Alternatively, for use with older kernels, create a tmpfs partition as follows (as root): ``` $ mount -t tmpfs -o size=4G tmpfs /mnt/mem # creates a 4GB tmpfs partition $ chmod -R a+rw /mnt/mem # enables read/write permissions to all users ``` ### STEPS TO BUILD AND RUN TESTS ### Once all the prerequisites have been satisfied: ``` $ git clone https://github.com/pmem/pmul.git $ cd pmul $ EXPORT LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/pmul/target/cppbuild:: $ mvn test -Dtest.heap.path= ``` Available Maven commands include: - `compile` - builds sources - `test` - builds and runs tests - `javadoc:javadoc` - builds javadocs into ```target/site/apidocs``` - `package` - builds jar file into ```target``` directory ### USING THIS LIBRARY IN EXISTING JAVA APPLICATIONS ### To use this library in your Java application, build the PMUL jar and specify its location in the module path argument. Also ensure that environment variable LD_LIBRARY_PATH includes paths to the required native libraries. For example: ``` $ EXPORT LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/pmul/target/cppbuild:: $ mvn package $ javac --module-path /target/pmul-.jar --add-modules jdk.incubator.foreign,com.intel.pmem.pmul $ java --module-path /target/pmul-.jar --add-modules jdk.incubator.foreign,com.intel.pmem.pmul --enable-native-access com.intel.pmem.pmul,ALL-UNNAMED --add-reads=com.intel.pmem.pmul=java.compiler ``` Alternatively, use PMUL's `target/classes` directory as the module path. For example: ``` $ EXPORT LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/pmul/target/cppbuild:: $ mvn compile $ javac --module-path /target/classes --add-modules jdk.incubator.foreign,com.intel.pmem.pmul $ java ---module-path /target/classes --add-modules jdk.incubator.foreign,com.intel.pmem.pmul --enable-native-access com.intel.pmem.pmul,ALL-UNNAMED --add-reads=com.intel.pmem.pmul=java.compiler ``` ## CONTRIBUTING ## Thanks for your interest! Please see the CONTRIBUTING.md document for information on how to contribute. We would love to hear your comments and suggestions via https://github.com/pmem/pmul/issues. ## Contacts ## For more information on this library, contact Olasoji Denloye (olasoji.denloye@intel.com), or Steve Dohrmann (steve.dohrmann@intel.com).