=head1 NAME
APR::BucketAlloc - Perl API for Bucket Allocation
=head1 Synopsis
use APR::BucketAlloc ();
$ba = APR::BucketAlloc->new($pool);
$ba->destroy;
=head1 Description
C is used for bucket allocation.
=head2 C
Create an C object:
$ba = APR::BucketAlloc->new($pool);
=over 4
=item class: C
=item arg1: C<$pool>
( C> )
The pool used to create this object.
=item ret: C<$ba>
( C> )
The new object.
=item since: 2.0.00
=back
This bucket allocation list (freelist) is used to create new buckets
(via Cnew|docs::2.0::api::APR::Bucket/C_new_>>)
and bucket brigades (via
Cnew|docs::2.0::api::APR::Brigade/C_new_>>).
You only need to use this method if you aren't running under httpd.
If you are running under mod_perl, you already have a bucket
allocation available via
Cbucket_alloc|docs::2.0::api::Apache2::Connection/C_bucket_alloc_>>
and
Cbucket_alloc|docs::2.0::api::APR::Brigade/C_bucket_alloc_>>.
Example:
use APR::BucketAlloc ();
use APR::Pool ();
my $ba = APR::BucketAlloc->(APR::Pool->pool);
my $eos_b = APR::Bucket::eos_create($ba);
=head2 C
Destroy an C>:
$ba->destroy;
=over 4
=item arg1: C<$ba>
( C> )
The freelist to destroy.
=item ret: no return value
=item since: 2.0.00
=back
Once destroyed this object may not be used again.
You need to destroy C<$ba> B if you have created it via
Cnew|/C_new_>>. If you try to destroy an
allocation not created by this method, you will get a segmentation
fault.
Moreover normally it is not necessary to destroy allocators, since the
pool which created them will destroy them during that pool's cleanup
phase.
=head1 See Also
L.
=head1 Copyright
mod_perl 2.0 and its core modules are copyrighted under
The Apache Software License, Version 2.0.
=head1 Authors
L.
=cut