1PMEM2_MAP_DELETE(3)        PMDK Programmer's Manual        PMEM2_MAP_DELETE(3)
2
3
4

NAME

6       pmem2_map_delete() - deletes a mapping
7

SYNOPSIS

9              #include <libpmem2.h>
10
11              int pmem2_map_delete(struct pmem2_map **map_ptr);
12

DESCRIPTION

14       The  pmem2_map_delete()  function  deletes the mapping described by the
15       struct pmem2_map object.
16
17       If pmem2_map_delete() succeeds in deleting the mapping, it releases the
18       struct  pmem2_map  object  describing  it  and  writes  a NULL value to
19       map_ptr.  If the function fails, the map_ptr variable and the  map  ob‐
20       ject  itself  are  left  unmodified  and appropriate error value is re‐
21       turned.  For a list of possible return values please see RETURN VALUE.
22
23       The pmem2_map_delete() function will not unmap mapping provided by  the
24       user  by pmem2_map_from_existing() function.  In such case it will only
25       free struct pmem2_map object.
26

RETURN VALUE

28       The pmem2_map_delete() function returns 0 on success or a negative  er‐
29       ror code on failure.
30

ERRORS

32       The pmem2_map_delete() can fail with the following errors:
33
34PMEM2_E_MAPPING_NOT_FOUND - mapping was not found (it was already un‐
35         mapped or pmem2_map state was corrupted)
36
37       On systems other than Windows it can also return -EINVAL from  the  un‐
38       derlying munmap(2) function.
39

SEE ALSO

41       pmem2_map_new(3), libpmem2(7) and <http://pmem.io>
42
43
44
45PMDK - pmem2 API version 1.0      2020-10-28               PMEM2_MAP_DELETE(3)
Impressum