aboutsummaryrefslogtreecommitdiffstats
path: root/main.h
diff options
context:
space:
mode:
authorcebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru>2008-09-18 19:27:53 +0400
committercebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru>2008-09-18 19:27:53 +0400
commit2c879bedd2c9b835fb083a152e5f09d48b1dbca6 (patch)
tree30dfc5cd240481ec6cd7320eb2de79e02017cbf8 /main.h
parentbb2e8a89d2e4caf5345e565f4da5aeb6fc39655b (diff)
downloadrspamd-2c879bedd2c9b835fb083a152e5f09d48b1dbca6.tar.gz
rspamd-2c879bedd2c9b835fb083a152e5f09d48b1dbca6.zip
* Add memory pool support.
- memory pools would be used in modules for allocating task specific data without freeing it separately - memory pools growth is implemented as multiplying by 2 its length (for avoiding multiply reallocs) - when memory pool is freed all data that was allocated from this pool is freed too
Diffstat (limited to 'main.h')
-rw-r--r--main.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.h b/main.h
index cedec5eb2..c7e39c38f 100644
--- a/main.h
+++ b/main.h
@@ -20,6 +20,7 @@
#include <event.h>
#include "fstring.h"
+#include "mem_pool.h"
#include "url.h"
#include "memcached.h"
@@ -135,6 +136,8 @@ struct worker_task {
TAILQ_HEAD (chainsq, chain_result) chain_results;
struct config_file *cfg;
struct save_point save;
+ /* Memory pool that is associated with this task */
+ memory_pool_t *task_pool;
};
struct module_ctx {