.TH kalloc() "" "" "Internal Kernel Routine"
.PC "Allocate kernel memory"
.B "#include <sys/coherent.h>"
\fBchar * kalloc(\fIn\^\fB)\fR
\fBint \fIn\^\fB;\fR
.PP
.B kalloc()
is a macro that allocates \fIn\fR bytes in the kernel's data segment.
The amount of space available to
.B kalloc()
is limited by the kernel variable
.BR ALLSIZE .
.B kalloc()
returns a pointer to the allocated buffer, or NULL if space is insufficient.
.PP
The storage space returned contains garbage.
Most drivers use
.B memset()
to clear the storage, if needed.
Space allocated with
.B kalloc()
must be deallocated with
.BR kfree() .
.SH "See Also"
.B
kfree(),
internal kernel routines
.R
