'\"macro stdmacro
.if n .pH ddi_dki.bzero @(#)bzero	40.6 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} bzero D3DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} bzero D3DK "" "DDI/DKI"
.if \nX=2 .ds x} bzero D3DK "" "\&"
.if \nX=3 .ds x} bzero "" "" "\&"
.TH \*(x}
.IX "\f4bzero\fP(D3DK)"
.IX "memory, clear"
.SH NAME
\f4bzero\f1 \- clear memory for a given number of bytes 
.SH SYNOPSIS
.nf
.na
\f4#include <sys/types.h>
.sp 0.5
int bzero(\f4caddr_t\f2addr, \f4int\f1 \f2bytes\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n 10
.IP "\f2addr\f1" 10n
Starting virtual address of memory to be cleared.
.IP "\f2bytes\f1" 10n
The number of bytes to clear starting at \f2addr\f1.
.RE
.SH DESCRIPTION\f1
The \f4bzero\f1 function clears a contiguous portion of memory by
filling the memory with zeros.
.P
\f3CAUTION:\f1
The address range specified must be within the
kernel space.  No range checking is done.  If an address outside of the
kernel space is selected, the driver may corrupt the system in an
unpredictable way.
.SH "RETURN VALUE"
Under normal conditions, a \f40\f1 is returned.
Otherwise, a \f4-1\f1 is returned.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
.na
\f4bcopy\f1(D3DK),
\f4clrbuf\f1(D3DK),
\f4kmem_zalloc\f1(D3DK)
.ad
.SH EXAMPLE
In a driver \f4close\f1(D2DK) routine, rather than clear each individual
member of its private data structure, the driver 
could use \f4bzero\f1 as shown here:
.P
.RS
\f4bzero(&drv_dat[minor(dev)], sizeof(struct drvr_data));\f1
.RE
