pmem2_map_delete(3)

pmem2_map_delete3

Deletes a mapping

Usage

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

Overview

The pmem2_map_delete() function deletes the mapping described by the struct pmem2_map object.

If pmem2_map_delete() succeeds in deleting the mapping, it releases the struct pmem2_map object describing it and writes a NULL value to map_ptr. If the function fails, the map_ptr variable and the map object itself are left unmodified and appropriate error value is returned. For a list of possible return values please see RETURN VALUE.

The pmem2_map_delete() function will not unmap mapping provided by the user by pmem2_map_from_existing() function. In such case it will only free struct pmem2_map object.

Return value

The pmem2_map_delete() function returns 0 on success or a negative error code on failure.

Errors

The pmem2_map_delete() can fail with the following errors:

•

PMEM2_E_MAPPING_NOT_FOUND - mapping was not found (it was already unmapped or pmem2_map state was corrupted)

On systems other than Windows it can also return -EINVAL from the underlying munmap(2) function.

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

From libpmem2-dev 1.13.1-1.1+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.