---
name: "rpma_mr_dereg"
section: "3"
platform: "linux"
package: "librpma-dev"
version: "1.3.0-2+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rpma_mr_dereg"
---

# rpma\_mr\_dereg(3)

delete a local memory registration object

## NAME

**rpma\_mr\_dereg** - delete a local memory registration object

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_mr_local;
      int rpma_mr_dereg(struct rpma_mr_local **mr_ptr);
```

## DESCRIPTION

**rpma\_mr\_dereg**() deregisters a memory region and deletes a local memory registration object.

## RETURN VALUE

The **rpma\_mr\_dereg**() function returns 0 on success or a negative error code on failure. **rpma\_mr\_dereg**() does not set \*mr\_ptr value to NULL on failure.

## ERRORS

**rpma\_mr\_dereg**() can fail with the following errors:

- •

  RPMA\_E\_INVAL - mr\_ptr is NULL

- •

  RPMA\_E\_PROVIDER - memory deregistration failed

## SEE ALSO

[**rpma\_mr\_reg**(3)](/rpma_mr_reg/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
