comment: <> (SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT) comment: <> (LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,) comment: <> (DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY) comment: <> (THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT) comment: <> ((INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE) comment: <> (OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.)
libpmem2 - persistent memory support library (EXPERIMENTAL)
#include <libpmem2.h> cc ... -lpmem2
Two versions of libpmem2 are typically available on a development system. The normal version, accessed when a program is linked using the -lpmem2 option, is optimized for performance. That version skips checks that impact performance and never logs any trace information or performs any run-time assertions.
A second version of libpmem2, accessed when a program uses the libraries under /usr/lib/pmdk_debug, contains run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to /usr/lib/pmdk_debug or /usr/lib64/pmdk_debug, as appropriate. Debugging output is controlled using the following environment variables. These variables have no effect on the non-debug version of the library.
The value of PMEM2_LOG_LEVEL enables trace points in the debug version of the library, as follows:
0 - This is the default level when PMEM2_LOG_LEVEL is not set. No log messages are emitted at this level.
1 - Additional details on any errors detected are logged, in addition to returning the errno-based errors as usual. The same information may be retrieved using pmem2_errormsg().
2 - A trace of basic operations is logged.
3 - Enables a very verbose amount of function call tracing in the library.
4 - Enables voluminous and fairly obscure tracing information that is likely only useful to the libpmem2 developers.
Unless PMEM2_LOG_FILE is set, debugging output is written to stderr.
Specifies the name of a file where all logging information should be written. If the last character in the name is “-”, the PID of the current process will be appended to the file name when the log file is created. If PMEM2_LOG_FILE is not set, output is written to stderr.
libpmem2 builds on the persistent memory programming model recommended by the SNIA NVM Programming Technical Work Group: http://snia.org/nvmp
libpmem(7), libpmemblk(7), libpmemlog(7), libpmemobj(7) and http://pmem.io
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.