.TH allocb() "" "" "DDI/DKI Kernel Routine"
.PC "Allocate a message block"
.B "#include <sys/types.h>"
.B "#include <sys/stream.h>"
\fBmblk_t *allocb(\fIsize\^\fB, \fIpriority\fB)\fR
\fBint \fIsize\^\fB; uint_t \fIpriority\^\fB;\fR
.PP
.B allocb()
allocates a \*(ST message block that is
.I size
bytes long.
.PP
.I priority
gives the message's priority, as follows:
.IP \fBBPRI_LO\fR 1.0i
Low priority.
Use this for routine allocation of data.
.IS \fBBPRI_MED\fR
Medium priority.
Use this to allocate blocks that are not critical, but are not data either.
.IS \fBBPRI_HI\fR
High priority.
Use this for allocations that must succeed; note, however,
that the DDI/DKI does not guarantee success.
.PP
Note that some implementations ignore
.IR priority .
.PP
If all goes well,
.B allocb()
returns a pointer to the allocated message block; otherwise, it returns NULL.
.SH "See Also"
.B
DDI/DKI kernel routines,
freeb(),
msgb
.R
.SH Notes
.B allocb()
has base or interrupt level.
It does not sleep.
.PP
An application can hold
driver-defined basic locks, read/write locks, and sleep locks
across calls to this function.
