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