Allocates message and data blocks.
The allocb utility allocates blocks for a message. When a message is allocated in this manner, the b_band field of the mblk_t structure is initially set to a value of 0. Modules and drivers can set this field.
This utility is part of STREAMS Kernel Extensions.
Item | Description |
---|---|
size | Specifies the minimum number of bytes needed in the data buffer. |
pri | Specifies the relative importance of the allocated blocks
to the module. The possible values are:
|
The allocb utility returns a pointer to a message block of type M_DATA in which the data buffer contains at least the number of bytes specified by the size parameter. If a block cannot be allocated as requested, the allocb utility returns a null pointer.