/dovecot/src/lib/ |
H A D | mempool.h | 6 /* When DEBUG is enabled, Dovecot warns whenever a memory pool is grown. 7 This is done so that the initial pool size could be set large enough so that 17 typedef struct pool *pool_t; 20 const char *(*get_name)(pool_t pool); 22 void (*ref)(pool_t pool); 23 void (*unref)(pool_t *pool); 25 void *(*malloc)(pool_t pool, size_t size) ATTR_RETURNS_NONNULL; 26 void (*free)(pool_t pool, void *mem); 29 void *(*realloc)(pool_t pool, void *mem, 33 /* Frees all the memory in pool 42 struct pool { struct 97 p_malloc(pool_t pool, size_t size) argument 103 p_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size) argument 117 p_free_internal(pool_t pool, void *mem) argument 122 p_clear(pool_t pool) argument 127 p_get_max_easy_alloc_size(pool_t pool) argument 132 pool_get_name(pool_t pool) argument 137 pool_ref(pool_t pool) argument 142 pool_unref(pool_t *pool) argument [all...] |
H A D | mempool-datastack.c | 7 static const char *pool_data_stack_get_name(pool_t pool); 8 static void pool_data_stack_ref(pool_t pool); 9 static void pool_data_stack_unref(pool_t *pool); 10 static void *pool_data_stack_malloc(pool_t pool, size_t size); 11 static void pool_data_stack_free(pool_t pool, void *mem); 12 static void *pool_data_stack_realloc(pool_t pool, void *mem, 14 static void pool_data_stack_clear(pool_t pool); 15 static size_t pool_data_stack_get_max_easy_alloc_size(pool_t pool); 32 static const struct pool static_data_stack_pool = { 40 struct pool poo member in struct:datastack_pool 62 pool_data_stack_ref(pool_t pool) argument 72 pool_data_stack_unref(pool_t *pool) argument 98 pool_data_stack_free(pool_t pool, void *mem ATTR_UNUSED) argument 106 pool_data_stack_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size) argument [all...] |
H A D | mempool-unsafe-datastack.c | 7 static const char *pool_unsafe_data_stack_get_name(pool_t pool); 8 static void pool_unsafe_data_stack_ref(pool_t pool); 9 static void pool_unsafe_data_stack_unref(pool_t *pool); 10 static void *pool_unsafe_data_stack_malloc(pool_t pool, size_t size); 11 static void pool_unsafe_data_stack_free(pool_t pool, void *mem); 12 static void *pool_unsafe_data_stack_realloc(pool_t pool, void *mem, 14 static void pool_unsafe_data_stack_clear(pool_t pool); 15 static size_t pool_unsafe_data_stack_get_max_easy_alloc_size(pool_t pool); 32 static struct pool static_unsafe_data_stack_pool = { 41 static const char *pool_unsafe_data_stack_get_name(pool_t pool ATTR_UNUSE [all...] |
H A D | mempool-allocfree.c | 12 struct pool pool; member in struct:allocfree_pool 34 static const char *pool_allocfree_get_name(pool_t pool); 35 static void pool_allocfree_ref(pool_t pool); 36 static void pool_allocfree_unref(pool_t *pool); 37 static void *pool_allocfree_malloc(pool_t pool, size_t size); 38 static void pool_allocfree_free(pool_t pool, void *mem); 39 static void *pool_allocfree_realloc(pool_t pool, void *mem, 41 static void pool_allocfree_clear(pool_t pool); 42 static size_t pool_allocfree_get_max_easy_alloc_size(pool_t pool); 68 struct allocfree_pool *pool; local 84 pool_t pool; local 114 pool_allocfree_ref(pool_t pool) argument 125 pool_t pool = *_pool; local 169 pool_allocfree_malloc(pool_t pool, size_t size) argument 185 pool_allocfree_free(pool_t pool, void *mem) argument 197 pool_allocfree_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size) argument 224 pool_allocfree_clear(pool_t pool) argument 242 pool_allocfree_get_total_used_size(pool_t pool) argument 249 pool_allocfree_get_total_alloc_size(pool_t pool) argument [all...] |
H A D | test-mempool-allocfree.c | 23 pool_t pool; local 31 pool = pool_allocfree_create("test"); 42 p_free(pool, mem); 49 mem = p_realloc(pool, mem, last_alloc, i*2); 61 mem = p_realloc(pool, mem, last_alloc, i-2); 69 mem = p_malloc(pool, i); 78 test_assert(pool_allocfree_get_total_used_size(pool) == used); 80 pool_unref(&pool); 83 pool = pool_allocfree_create("test"); 87 mem = p_realloc(pool, me 99 static pool_t pool; local [all...] |
H A D | mempool-system.c | 19 static const char *pool_system_get_name(pool_t pool); 20 static void pool_system_ref(pool_t pool); 21 static void pool_system_unref(pool_t *pool); 22 static void *pool_system_malloc(pool_t pool, size_t size); 23 static void *pool_system_realloc(pool_t pool, void *mem, 25 static void pool_system_clear(pool_t pool); 26 static size_t pool_system_get_max_easy_alloc_size(pool_t pool); 43 struct pool static_system_pool = { 52 static const char *pool_system_get_name(pool_t pool ATTR_UNUSED) 57 static void pool_system_ref(pool_t pool ATTR_UNUSE [all...] |
H A D | test-hash.c | 7 static void test_hash_random_pool(pool_t pool) argument 15 hash_table_create_direct(&hash, pool, 0); 40 pool_t pool; local 44 pool = pool_alloconly_create("test hash", 1024); 45 test_hash_random_pool(pool); 46 pool_unref(&pool);
|
H A D | test-mempool-alloconly.c | 22 pool_t pool; local 30 pool = pool_alloconly_create(MEMPOOL_GROWING"test", i); 37 mem[0] = p_malloc(pool, j); 41 mem[k] = p_malloc(pool, k); 50 pool_unref(&pool); 58 static pool_t pool; local 60 if (pool == NULL && stage != 0) 66 pool = pool_alloconly_create(MEMPOOL_GROWING"fatal", 1); 68 (void)p_malloc(pool, 0); 73 (void)p_malloc(pool, SSIZE_T_MA [all...] |
H A D | mempool.c | 5 size_t pool_get_exp_grown_size(pool_t pool, size_t old_size, size_t min_size) argument 12 easy_size = old_size + p_get_max_easy_alloc_size(pool);
|
/dovecot/src/indexer/ |
H A D | worker-pool.c | 8 #include "worker-pool.h" 28 worker_connection_list_free(struct worker_pool *pool, 34 struct worker_pool *pool; local 36 pool = i_new(struct worker_pool, 1); 37 pool->socket_path = i_strdup(socket_path); 38 pool->callback = callback; 39 return pool; 44 struct worker_pool *pool = *_pool; local 48 while (pool->busy_list != NULL) { 49 struct worker_connection_list *list = pool 66 worker_pool_have_busy_connections(struct worker_pool *pool) argument 71 worker_pool_add_connection(struct worker_pool *pool) argument 93 worker_connection_list_free(struct worker_pool *pool, struct worker_connection_list *list) argument 103 worker_pool_find_max_connections(struct worker_pool *pool) argument 122 worker_pool_get_connection(struct worker_pool *pool, struct worker_connection **conn_r) argument 151 worker_pool_kill_idle_connections(struct worker_pool *pool) argument 166 worker_pool_release_connection(struct worker_pool *pool, struct worker_connection *conn) argument 195 worker_pool_find_username_connection(struct worker_pool *pool, const char *username) argument [all...] |
H A D | worker-pool.h | 10 void worker_pool_deinit(struct worker_pool **pool); 12 bool worker_pool_have_busy_connections(struct worker_pool *pool); 14 bool worker_pool_get_connection(struct worker_pool *pool, 16 void worker_pool_release_connection(struct worker_pool *pool, 20 worker_pool_find_username_connection(struct worker_pool *pool,
|
/dovecot/src/lib-ldap/ |
H A D | ldap-connection-pool.c | 6 #include "ldap-connection-pool.h" 15 static void ldap_connection_list_remove(struct ldap_connection_pool *pool, argument 18 DLLIST_REMOVE(&pool->conn_list, list); 19 pool->conn_count--; 26 ldap_connection_pool_shrink_to(struct ldap_connection_pool *pool, argument 31 list = pool->conn_list; 32 for (; list != NULL && pool->conn_count > max_count; list = next) { 35 ldap_connection_list_remove(pool, list); 42 struct ldap_connection_pool *pool; local 44 pool 51 struct ldap_connection_pool *pool = *_pool; local 60 ldap_connection_pool_get(struct ldap_connection_pool *pool, struct ldap_client *client, const struct ldap_client_settings *set, struct ldap_connection_list **list_r, const char **error_r) argument 91 ldap_connection_pool_unref(struct ldap_connection_pool *pool, struct ldap_connection_list **_list) argument 104 ldap_connection_pool_have_references(struct ldap_connection_pool *pool) argument [all...] |
H A D | ldap-connection-pool.h | 17 bool ldap_connection_pool_have_references(struct ldap_connection_pool *pool); 19 int ldap_connection_pool_get(struct ldap_connection_pool *pool, 24 void ldap_connection_pool_unref(struct ldap_connection_pool *pool,
|
/dovecot/src/lib-imap/ |
H A D | imap-base-subject.h | 10 const char *imap_get_base_subject_cased(pool_t pool, const char *subject,
|
H A D | test-imap-match.c | 53 pool_t pool; local 55 pool = pool_alloconly_create("imap match", 1024); 60 glob = imap_match_init(pool, test[i].pattern, 66 p_clear(pool); 75 glob = imap_match_init(pool, inbox_test[i].pattern, 81 p_clear(pool); 87 pool_unref(&pool); 94 pool_t pool; local 96 pool = pool_alloconly_create("imap match globs equal", 1024); 99 glob = imap_match_init(pool, " [all...] |
H A D | imap-bodystructure.h | 18 int imap_bodystructure_parse_full(const char *bodystructure, pool_t pool, 23 int imap_bodystructure_parse_args(const struct imap_arg *args, pool_t pool, 29 int imap_bodystructure_parse(const char *bodystructure, pool_t pool,
|
H A D | imap-envelope.h | 13 pool_t pool, struct message_part_envelope **envlp_r, 17 pool_t pool, struct message_part_envelope **envlp_r,
|
/dovecot/src/plugins/expire/ |
H A D | expire-set.c | 10 pool_t pool; member in struct:expire_set 19 pool_t pool; local 21 pool = pool_alloconly_create("Expire pool", 512); 22 set = p_new(pool, struct expire_set, 1); 23 set->pool = pool; 24 p_array_init(&set->globs, set->pool, 16); 27 glob = imap_match_init(set->pool, *pattern, TRUE, '/'); 38 pool_unref(&set->pool); [all...] |
/dovecot/src/doveadm/dsync/ |
H A D | dsync-serializer.c | 10 pool_t pool; member in struct:dsync_serializer 16 pool_t pool; member in struct:dsync_serializer_encoder 24 pool_t pool; local 28 pool = pool_alloconly_create("dsync serializer", 512); 29 serializer = p_new(pool, struct dsync_serializer, 1); 30 serializer->pool = pool; 33 dup_keys = p_new(pool, const char *, count + 1); 35 dup_keys[i] = p_strdup(pool, keys[i]); 47 pool_unref(&serializer->pool); 69 pool_t pool = pool_alloconly_create("dsync serializer encode", 1024); local [all...] |
H A D | dsync-deserializer.c | 10 pool_t pool; member in struct:dsync_deserializer 19 pool_t pool; member in struct:dsync_deserializer_decoder 47 pool_t pool; local 51 pool = pool_alloconly_create("dsync deserializer", 1024); 52 deserializer = p_new(pool, struct dsync_deserializer, 1); 53 deserializer->pool = pool; 54 deserializer->name = p_strdup(pool, name); 55 deserializer->keys = (void *)p_strsplit_tabescaped(pool, header_line); 60 dup_required_fields = p_new(pool, cons 98 pool_t pool; local [all...] |
/dovecot/src/lib-storage/ |
H A D | fail-mail-storage.c | 11 pool_t pool; local 13 pool = pool_alloconly_create("fail mail storage", 1024); 14 storage = p_new(pool, struct mail_storage, 1); 16 storage->pool = pool; 59 p_array_init(&storage->module_contexts, storage->pool, 5);
|
/dovecot/src/auth/ |
H A D | mech-anonymous.c | 20 request->user = p_strdup(request->pool, 30 pool_t pool; local 32 pool = pool_alloconly_create(MEMPOOL_GROWING"anonymous_auth_request", 2048); 33 request = p_new(pool, struct auth_request, 1); 34 request->pool = pool;
|
H A D | mech-external.c | 46 pool_t pool; local 48 pool = pool_alloconly_create(MEMPOOL_GROWING"external_auth_request", 2048); 49 request = p_new(pool, struct auth_request, 1); 50 request->pool = pool;
|
/dovecot/src/lib-dict/ |
H A D | dict-transaction-memory.c | 8 struct dict *dict, pool_t pool) 11 ctx->pool = pool; 12 p_array_init(&ctx->changes, pool, 32); 20 pool_unref(&ctx->pool); 32 change->key = p_strdup(ctx->pool, key); 33 change->value.str = p_strdup(ctx->pool, value); 45 change->key = p_strdup(ctx->pool, key); 57 change->key = p_strdup(ctx->pool, key); 7 dict_transaction_memory_init(struct dict_transaction_memory_context *ctx, struct dict *dict, pool_t pool) argument
|
/dovecot/src/lib-http/ |
H A D | http-url.h | 49 enum http_url_parse_flags flags, pool_t pool, 53 const char *host_header, pool_t pool, 76 void http_url_copy_authority(pool_t pool, struct http_url *dest, 78 struct http_url *http_url_clone_authority(pool_t pool, 81 void http_url_copy(pool_t pool, struct http_url *dest, 83 void http_url_copy_with_userinfo(pool_t pool, struct http_url *dest, 86 struct http_url *http_url_clone(pool_t pool,const struct http_url *src); 87 struct http_url *http_url_clone_with_userinfo(pool_t pool,
|