---
name: "memset_explicit"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/memset_explicit"
---

# memset\_explicit(3)

memory set explicit

## NAME

memset\_explicit - memory set explicit

## LIBRARY

None.

*It is not yet implemented in glibc.*

## SYNOPSIS

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

**void \*memset\_explicit(**size\_t n;                       **void** *a***\[***n***\], int** *c***, size\_t** *n***);**

## DESCRIPTION

This function is similar to [**memset**(3)](/memset/3.md), 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)](/memset/3.md).

## ATTRIBUTES

For an explanation of the terms used in this section, see [**attributes**(7)](/attributes/7.md).

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **memset\_explicit**() | Thread safety | MT-Safe |

## STANDARDS

C23.

## HISTORY

C23.

## CAVEATS

See [**explicit\_bzero**(3)](/explicit_bzero/3.md).

## SEE ALSO

[**bstring**(3)](/bstring/3.md), [**memory.h**(3head)](/memory.h/3head.md), [**explicit\_bzero**(3)](/explicit_bzero/3.md)
