~ubuntu-branches/ubuntu/trusty/rsync/trusty

« back to all changes in this revision

Viewing changes to lib/pool_alloc.3

  • Committer: Package Import Robot
  • Author(s): Paul Slootman
  • Date: 2013-10-27 12:01:10 UTC
  • mfrom: (1.1.13) (2.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20131027120110-mpr03n5scqmf40mi
Tags: 3.1.0-2
fix build failure if zlib1g-dev package is not installed;
solved by building without the included zlib source and adding a
build-depends on zlib1g-dev >= 1:1.2.8
closes:32379

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
.I quantum
96
96
will produce a quantum that should meet maximal alignment
97
97
on most platforms.
98
 
If
99
 
.B POOL_QALIGN
 
98
Unless
 
99
.B POOL_NO_QALIGN
100
100
is set in the
101
101
.IR flags ,
102
102
allocations will be aligned to addresses that are a
103
103
multiple of
104
104
.IR quantum .
 
105
A
 
106
.B NULL
 
107
may be specified for the
 
108
.I bomb
 
109
function pointer if it is not needed.  (See the
 
110
.B pool_alloc()
 
111
function for how it is used.)
105
112
If
106
113
.B POOL_CLEAR
107
114
is set in the
108
115
.IR flags ,
109
116
all allocations from the pool will be initialized to zeros.
110
 
You may specify a
111
 
.B NULL
112
 
for the
113
 
.I bomb
114
 
function pointer if you don't wish to use it.  (See the
115
 
.B pool_alloc()
116
 
function for how it is used.)
 
117
If either
 
118
.B POOL_PREPEND
 
119
or
 
120
.B POOL_INTERN
 
121
is specified in the
 
122
.IR flags ,
 
123
each extent's data structure will be allocated at the start of the
 
124
.IR size -length
 
125
buffer (rather than as a separate, non-pool allocation), with the
 
126
former extending the
 
127
.I size
 
128
to hold the structure, and the latter subtracting the structure's
 
129
length from the indicated
 
130
.IR size .
117
131
.P
118
132
.B pool_destroy()
119
133
destroys an allocation
131
145
.BR 0 ,
132
146
.I quantum
133
147
bytes will be allocated.
134
 
If the pool has been created with
135
 
.BR POOL_QALIGN ,
 
148
If the pool has been created without
 
149
.BR POOL_NO_QALIGN ,
136
150
every chunk of memory that is returned will be suitably aligned.
137
151
You can use this with the default
138
152
.I quantum
169
183
If
170
184
.I addr
171
185
is
172
 
.BR 0 ,
 
186
.BR NULL ,
173
187
no memory will be freed, but subsequent allocations will come
174
188
from a new extent.
175
189
.P