summaryrefslogtreecommitdiffstats
path: root/lpsm_init.3.in
blob: 5653cce06e4adb1591c36eb4f9e63a285c83eaeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.\" -*- nroff -*- ---------------------------------------------------------
.\"   
.\"   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
.\"
.\"   This program is free software; you can redistribute it and/or modify
.\"   it under the terms of the GNU Lesser General Public License as
.\"   published by the Free Software Foundation, Inc.,
.\"   59 Temple Place Ste 330, Bostom MA 02111-1307, USA; version 2.1,
.\"   incorporated herein by reference.
.\"
.\" -----------------------------------------------------------------------
.TH LPSM_INIT 3  "25 October 2001" "LPSM @@VERSION@@" "Linux Persistent Memory"
.SH NAME
lpsm_init \- Open persistent memory in managed mode
.SH SYNOPSIS
.nf
.B #include <lpsm.h>
.sp
.BI "void **lpsm_init(const char " "*datafile" ", const char " "*logfile" ");"
.fi
.SH DESCRIPTION
This function is used to manage an LPSM persistent memory arena in
managed mode, available for use with
.B lpsm_malloc()
and its related functions.
.PP
.B lpsm_init()
opens or creates the managed persistent memory store the filenames of
which are
.I datafile
and
.IR logfile .
On success, returns a pointer to an array of
.B LPSM_ROOT_POINTERS
(32) "root pointers"
.RI ( "void\ *" ),
which are available for the application to point to its
fundamental data structures.  On failure, returns
.BR NULL .
.SH "RETURN VALUES"
.B lpsm_init()
returns the pointer to the root pointer array, or
.B NULL
on failure.
.SH "ERRORS"
On error,
.B lpsm_init()
will set
.I errno
to the appropriate error value.  In particular, if the files specified
do not contain a valid managed-mode LPSM arena compatible with this
machine architecture,
.I errno
is set to
.BR EINVAL .
.SH "SEE ALSO"
.BR lpsm_malloc (3),
.BR lpsm_arena_init (3),
.BR lpsm_checkpoint (3),
.BR lpsm_shutdown (3),
.BR lpsm_recover (3),
.BR lpsm (7).
.SH BUGS
The persistent memory system is not currently thread-safe.