pmem2 API version 1.0

comment: <> (SPDX-License-Identifier: BSD-3-Clause comment: <> (Copyright 2019-2020, Intel Corporation)

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

NAME

pmem2_unmap() - deletes a mapping

SYNOPSIS

#include <libpmem2.h>

int pmem2_unmap(struct pmem2_map **map_ptr);

DESCRIPTION

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

If pmem2_unmap() succeeds, 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 will be returned. For a list of possible return values please see RETURN VALUE.

RETURN VALUE

When pmem2_unmap() succeeds it returns 0. Otherwise, it returns one of the following error values:

  • 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.

SEE ALSO

pmem2_map(3), libpmem2(7) and http://pmem.io

The contents of this web site and the associated GitHub repositories are BSD-licensed open source.