[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

freeb Utility


Frees a single message block.


void freeb(bp)
register struct msgb *bp;


The freeb utility frees (deallocate) the message-block descriptor pointed to by the bp parameter. It also frees the corresponding data block if the reference count (see the dupb utility) in the data-block descriptor (datab structure) is equal to 1. If the reference count is greater than 1, the freeb utility does not free the data block, but decrements the reference count instead.

If the reference count is 1 and if the message was allocated by the esballoc utility, the function specified by the db_frtnp->free_func pointer is called with the parameter specified by the db_frtnp->free_arg pointer.

The freeb utility cannot be used to free a multiple-block message (see the freemsg utility). Results are unpredictable if the freeb utility is called with a null argument. Always ensure that the pointer is nonnull before using the freeb utility.


bp Contains a pointer to the message-block descriptor that is to be freed.

Implementation Specifics

This utility is part of STREAMS Kernel Extensions.

Related Information

The dupb utility, esballoc utility, freemsg utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX Version 4.3 Communications Programming Concepts.

[ Previous | Next | Contents | Glossary | Home | Search ]