Manual Page Search Parameters
explicit_bzero(3, 3bsd) write zeroes to a byte string
bzero, explicit_bzero(3) zero a byte string

explicit_bzero(3bsd) 3bsd explicit_bzero(3bsd)

explicit_bzerowrite zeroes to a byte string

library “libbsd”

#include <string.h> (See libbsd(7) for include usage.)
void
explicit_bzero(void *buf, size_t len);

The () function writes len zero bytes to the string buf. If len is zero, explicit_bzero() does nothing.

The () variant behaves the same as the () function, but will not be removed by a compiler's dead store optimization pass, making it useful for clearing sensitive memory such as a password.

bzero(3), memset(3), swab(3)

The explicit_bzero() function first appeared in OpenBSD 5.5, glibc 2.25.

January 22, 2014 x86_64