---
name: "memzero_explicit"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/memzero_explicit"
---

# memzero\_explicit(9)

Fill a region of memory (e.g. sensitive keying data) with 0s.

## NAME

memzero\_explicit - Fill a region of memory (e.g. sensitive keying data) with 0s.

## SYNOPSIS

**void memzero\_explicit(void \*** *s***, size\_t** *count***);**

## ARGUMENTS

*s*

Pointer to the start of the area.

*count*

The size of the area.

## NOTE

usually using **memset** is just fine (!), but in cases where clearing out \_local\_ data at the end of a scope is necessary, **memzero\_explicit** should be used instead in order to prevent the compiler from optimising away zeroing.

**memzero\_explicit** doesn't need an arch-specific version as it just invokes the one of **memset** implicitly.

## COPYRIGHT
