37 int num_headers_in_partial_bucket =
40 if (num_headers_in_partial_bucket + num_headers_in_bucket <
41 num_headers_per_bucket) {
46 for (i = 1; i < num_headers_in_partial_bucket; i++) {
47 partial_bucket_tail = partial_bucket_tail->
p_next;
49 partial_bucket_tail->
p_next = bucket;
51 num_headers_in_partial_bucket + num_headers_in_bucket;
56 for (i = 1; i < num_headers_per_bucket - num_headers_in_bucket;
58 partial_bucket_header = partial_bucket_header->
p_next;
61 if (num_headers_in_partial_bucket + num_headers_in_bucket !=
62 num_headers_per_bucket) {
63 new_partial_bucket = partial_bucket_header->
p_next;
65 num_headers_per_bucket -
66 (num_headers_in_partial_bucket + num_headers_in_bucket);
68 partial_bucket_header->
p_next = bucket;
79 size_t header_size,
size_t header_offset,
size_t page_size,
81 uint32_t num_lp_type_requests,
size_t alignment_hint)
112 while ((p_page_lifo_elem =
118 &p_global_pool->p_mem_page_empty);
149 for (i = 0; i < bucket_index; i++) {
158 p_local_pool->
buckets[bucket_index]);
177 *p_bucket = popped_bucket;
181 const size_t header_size = p_global_pool->
header_size;
182 int num_headers = 0, i;
189 if ((p_page_lifo_elem =
195 const size_t page_size = p_global_pool->
page_size;
203 &lp_type, &p_alloc_mem);
206 if (num_headers != 0) {
216 p_page->
mem = p_alloc_mem;
224 int num_required = num_headers_per_bucket - num_headers;
225 if (num_required < num_provided)
226 num_provided = num_required;
231 (
void *)(((
char *)p_mem_extra) + header_size * num_provided);
245 void *p_cur_mem_page;
248 &p_global_pool->p_mem_page_empty);
260 p_local_tail->
p_next = p_head;
262 for (i = 1; i < num_provided; i++) {
269 num_headers += num_provided;
270 if (num_headers == num_headers_per_bucket) {