Loading...
Searching...
No Matches
apr_bucket_pool Struct Reference
APR Utility Functions » Bucket Brigades

`#include <apr_buckets.h>`

Collaboration diagram for apr_bucket_pool:
[legend]

## Data Fields

apr_bucket_heap | heap
const char * | base
apr_pool_t * | pool
apr_bucket_alloc_t * | list

## Detailed Description

A bucket referring to data allocated from a pool

## Field Documentation

## base

const char* apr_bucket_pool::base

The block of data actually allocated from the pool. Segments of this block are referenced by adjusting the start and length of the apr_bucket accordingly. This will be NULL after the pool gets cleaned up.

## heap

apr_bucket_heap apr_bucket_pool::heap

The pool bucket must be able to be easily morphed to a heap bucket if the pool gets cleaned up before all references are destroyed. This apr_bucket_heap structure is populated automatically when the pool gets cleaned up, and subsequent calls to pool_read() will result in the apr_bucket in question being morphed into a regular heap bucket. (To avoid having to do many extra refcount manipulations and b->data manipulations, the apr_bucket_pool struct actually contains the apr_bucket_heap struct that it will become as its first element; the two share their apr_bucket_refcount members.)

## list

apr_bucket_alloc_t* apr_bucket_pool::list

The freelist this structure was allocated from, which is needed in the cleanup phase in order to allocate space on the heap

## pool

apr_pool_t* apr_bucket_pool::pool

The pool the data was allocated from. When the pool is cleaned up, this gets set to NULL as an indicator to pool_read() that the data is now on the heap and so it should morph the bucket into a regular heap bucket before continuing.

The documentation for this struct was generated from the following file:

- apr_buckets.h