m_free Kernel Service

Purpose

Frees an mbuf structure and any associated external storage area.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/mbuf.h>

struct mbuf *m_free( m)
struct mbuf *m;

Parameter

Item Description
m Specifies the mbuf structure to be freed.

Description

The m_free kernel service returns an mbuf structure to the buffer pool. If the mbuf structure specified by the m parameter has an attached cluster (that is, a paged-size mbuf structure), the m_free kernel service also frees the associated external storage.

Execution Environment

The m_free kernel service can be called from either the process or interrupt environment.

Return Values

If the mbuf structure specified by the m parameter is the head of an mbuf chain, the m_free service returns the next mbuf structure in the chain. A null value is returned if the structure specified by the m parameter is not part of an mbuf chain.