osf1 man page for allocb

Query: allocb

OS: osf1

Section: 9r

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

allocb(9r)																allocb(9r)

NAME
allocb - STREAMS: Allocates a message block
SYNOPSIS
#include <sys/stream.h> MBLKP allocb( int size, uint pri );
ARGUMENTS
Specifies the number of bytes in the message block. Specifies the priority of the request. You use this argument to determine if the allo- cation of memory blocks (waits) on the request. If you call the allocb interface at a high priority and it blocks on the request, the sys- tem could deadlock. Typically, you pass the constant BPRI_WAITOK, which signifies that allocb can block. If allocb cannot block, you should pass the BPRI_HI constant.
DESCRIPTION
The allocb interface attempts to allocate a STREAMS message block. Buffer allocation fails only when the system is out of memory. If no buffer is available, you can call the bufcall interface, which helps a module recover from a memory allocation failure.
RETURN VALUES
Upon successful completion, the allocb interface returns a pointer to the allocated message block. This message block is of type struct msgb *. The msgb data structure is defined in the /usr/sys/include/sys/stream.h file. If allocb cannot allocate a message block, it returns a NULL pointer.
SEE ALSO
Kernel Routines: bufcall(9r), esballoc(9r), testb(9r) Programmer's Guide: STREAMS allocb(9r)
Related Man Pages
allocb(9r) - osf1
esballoc(9r) - osf1
allocb(9f) - sunos
allocb(9f) - minix
allocb(9f) - bsd
Similar Topics in the Unix Linux Community
file system full (1 block extent)
allocate memory for the same struct: sometimes successful, sometimes failure, why
pass a pointer-to-pointer, or return a pointer?
cannot run file.sh in file1.sh