---
name: "pmem2_map_get_store_granularity"
section: "3"
platform: "linux"
package: "libpmem2-dev"
version: "1.13.1-1.1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pmem2_map_get_store_granularity"
---

# pmem2\_map\_get\_store\_granularity(3)

reads effective mapping granularity

## NAME

**pmem2\_map\_get\_store\_granularity**() - reads effective mapping granularity

## SYNOPSIS

-

  ```
  #include <libpmem2.h>
  enum pmem2_granularity {
      PMEM2_GRANULARITY_BYTE,
      PMEM2_GRANULARITY_CACHE_LINE,
      PMEM2_GRANULARITY_PAGE,
  };
  enum pmem2_granularity pmem2_map_get_store_granularity(struct pmem2_map *map);
  ```

## DESCRIPTION

The **pmem2\_map\_get\_store\_granularity**() function reads granularity of the created mapping. The *map* parameter points to the structure describing mapping created using the [**pmem2\_map\_new**(3)](/pmem2_map_new/3.md) function. Concept of the granularity is described in [**libpmem2**(7)](/libpmem2/7.md).

## RETURN VALUE

The **pmem2\_map\_get\_store\_granularity**() function returns a granularity of the mapped area.

## SEE ALSO

[**pmem2\_map\_new**(3)](/pmem2_map_new/3.md), [**libpmem2**(7)](/libpmem2/7.md) and **\<https://pmem.io\>**
