### 39.6 Memory Related Tunables ¶

Tunable namespace: glibc.mem ¶

  This tunable namespace supports operations that affect the way the GNU C Library and the process manage memory.

Tunable: glibc.mem.tagging ¶

  If the hardware supports memory tagging, this tunable can be used to control the way the GNU C Library uses this feature. At present this is only supported on AArch64 systems with the MTE extension; it is ignored for all other systems.

  This tunable takes a value between 0 and 255 and acts as a bitmask that enables various capabilities.

  Bit 0 (the least significant bit) causes the `malloc` subsystem to allocate tagged memory, with each allocation being assigned a random tag.

  Bit 1 enables precise faulting mode for tag violations on systems that support deferred tag violation reporting. This may cause programs to run more slowly.

  Bit 2 enables either precise or deferred faulting mode for tag violations whichever is preferred by the system.

  Other bits are currently reserved.

  The GNU C Library startup code will automatically enable memory tagging support in the kernel if this tunable has any non-zero value.

  The default value is ‘`0`’, which disables all memory tagging.

Tunable: glibc.mem.decorate_maps ¶

  If the kernel supports naming anonymous virtual memory areas (since Linux version 5.17, although not always enabled by some kernel configurations), this tunable can be used to control whether the GNU C Library decorates the underlying memory obtained from operating system with a string describing its usage (for instance, on the thread stack created by `pthread_create` or memory allocated by `malloc`).

  The process mappings can be obtained by reading the `/proc/<pid>maps` (with `pid` being either the process ID or `self` for the process own mapping).

  This tunable takes a value of 0 and 1, where 1 enables the feature. The default value is ‘`0`’, which disables the decoration.