memset_explicit(3)

memset_explicit3

Memory set explicit

Usage

#include <string.h>  // see memory.h(3head)

void *memset_explicit(size_t n; void a[n], int c, size_t n);

Library

None.

It is not yet implemented in glibc.

Overview

This function is similar to memset(3), but guarantees that compiler optimizations will not remove the erase operation if the compiler deduces that the operation is "unnecessary".

Return value

See memset(3).

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
memset_explicit()Thread safetyMT-Safe

Caveats

See explicit_bzero(3).

Standards

C23.

History

C23.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.