GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BZERO(3) FreeBSD Library Functions Manual BZERO(3)

bzero, explicit_bzero
write zeroes to a byte string

Standard C Library (libc, -lc)

#include <strings.h>

void
bzero(void *b, size_t len);

void
explicit_bzero(void *b, size_t len);

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

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

memset(3), swab(3)

A bzero() function appeared in 4.3BSD. Its prototype existed previously in <string.h> before it was moved to <strings.h> for IEEE Std 1003.1-2001 (“POSIX.1”) compliance.

The explicit_bzero() function first appeared in OpenBSD 5.5 and FreeBSD 11.0.

IEEE Std 1003.1-2008 (“POSIX.1”) removes the specification of bzero() and it is marked as LEGACY in IEEE Std 1003.1-2004 (“POSIX.1”). For portability with other systems new programs should use memset(3).

August 24, 2015 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.