1docs::api::APR::BucketAUlsleorc(C3o)ntributed Perl Documdeonctsa:t:iaopni::APR::BucketAlloc(3)
2
3
4
6 APR::BucketAlloc - Perl API for Bucket Allocation
7
9 use APR::BucketAlloc ();
10 $ba = APR::BucketAlloc->new($pool);
11 $ba->destroy;
12
14 "APR::BucketAlloc" is used for bucket allocation.
15
16 "new"
17 Create an "APR::BucketAlloc" object:
18
19 $ba = APR::BucketAlloc->new($pool);
20
21 class: "APR::BucketAlloc"
22 arg1: $pool ( "APR::Pool object" )
23 The pool used to create this object.
24
25 ret: $ba ( "APR::BucketAlloc object" )
26 The new object.
27
28 since: 2.0.00
29
30 This bucket allocation list (freelist) is used to create new buckets
31 (via "APR::Bucket->new") and bucket brigades (via "APR::Brigade->new").
32
33 You only need to use this method if you aren't running under httpd. If
34 you are running under mod_perl, you already have a bucket allocation
35 available via "$c->bucket_alloc" and "$bb->bucket_alloc".
36
37 Example:
38
39 use APR::BucketAlloc ();
40 use APR::Pool ();
41 my $ba = APR::BucketAlloc->(APR::Pool->pool);
42 my $eos_b = APR::Bucket::eos_create($ba);
43
44 "destroy"
45 Destroy an "APR::BucketAlloc object":
46
47 $ba->destroy;
48
49 arg1: $ba ( "APR::BucketAlloc object" )
50 The freelist to destroy.
51
52 ret: no return value
53 since: 2.0.00
54
55 Once destroyed this object may not be used again.
56
57 You need to destroy $ba only if you have created it via
58 "APR::BucketAlloc->new". If you try to destroy an allocation not
59 created by this method, you will get a segmentation fault.
60
61 Moreover normally it is not necessary to destroy allocators, since the
62 pool which created them will destroy them during that pool's cleanup
63 phase.
64
66 mod_perl 2.0 documentation.
67
69 mod_perl 2.0 and its core modules are copyrighted under The Apache
70 Software License, Version 2.0.
71
73 The mod_perl development team and numerous contributors.
74
75
76
77perl v5.36.0 2023-01-19 docs::api::APR::BucketAlloc(3)