page Struct Reference

A dynamically allocated buffer which keeps track of its reference count. More...

#include <page.h>

Data Fields

int ref
 The number of references to this buffer.
size_t size
 The size of this buffer in bytes.
unsigned char data [sizeof(long)]
 Dynamic array containing the buffer data.

Detailed Description

A dynamically allocated buffer which keeps track of its reference count.

This is useful for passing buffers around, when several instances hold references to one buffer.

Definition at line 36 of file page.h.


Field Documentation

unsigned char page::data[sizeof(long)]

Dynamic array containing the buffer data.

Definition at line 53 of file page.h.

int page::ref

The number of references to this buffer.

This library uses atomic functions to access it, i.e. no locks are required. As soon as this attribute reaches zero, the buffer is freed.

Definition at line 43 of file page.h.

size_t page::size

The size of this buffer in bytes.

Definition at line 48 of file page.h.


The documentation for this struct was generated from the following file:
Generated on Sun May 2 21:28:33 2010 for MPD by  doxygen 1.6.3