[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2

freeb Utility

Purpose

Frees a single message block.

Syntax


void freeb(bp)
register struct msgb * bp;

Description

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.

This utility is part of STREAMS Kernel Extensions.

Parameters

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

Related Information

The dupb utility, esballoc utility, freemsg utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX 5L Version 5.2 Communications Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]