diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-27 17:31:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-27 17:36:29 +0100 |
commit | b05c7c9edd197eea8aa11abcc416ea1463748f98 (patch) | |
tree | 06c165d661c28a1246cd23a3752bd172787701d7 /src/libutil/mem_pool.h | |
parent | bbdc006ee99784d31d4b1df3290f1a63fd4086e5 (diff) | |
download | rspamd-b05c7c9edd197eea8aa11abcc416ea1463748f98.tar.gz rspamd-b05c7c9edd197eea8aa11abcc416ea1463748f98.zip |
Add tags to rspamd_mempool.
Diffstat (limited to 'src/libutil/mem_pool.h')
-rw-r--r-- | src/libutil/mem_pool.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h index 1befd8445..42df30148 100644 --- a/src/libutil/mem_pool.h +++ b/src/libutil/mem_pool.h @@ -82,6 +82,14 @@ struct _pool_destructors { }; /** + * Tag to use for logging purposes + */ +struct rspamd_mempool_tag { + gchar tagname[20]; /**< readable name */ + gchar uid[20]; /**< unique id */ +}; + +/** * Memory pool type */ struct rspamd_mutex_s; @@ -92,6 +100,7 @@ typedef struct memory_pool_s { struct _pool_destructors *destructors; /**< destructors chain */ GHashTable *variables; /**< private memory pool variables */ gsize elt_len; /**< size of an element */ + struct rspamd_mempool_tag tag; /**< memory pool tag */ } rspamd_mempool_t; /** @@ -114,7 +123,7 @@ typedef struct memory_pool_stat_s { * @param size size of pool's page * @return new memory pool object */ -rspamd_mempool_t * rspamd_mempool_new (gsize size); +rspamd_mempool_t *rspamd_mempool_new (gsize size, const gchar *tag); /** * Get memory from pool |