diff options
author | cebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru> | 2008-09-18 19:27:53 +0400 |
---|---|---|
committer | cebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru> | 2008-09-18 19:27:53 +0400 |
commit | 2c879bedd2c9b835fb083a152e5f09d48b1dbca6 (patch) | |
tree | 30dfc5cd240481ec6cd7320eb2de79e02017cbf8 /main.h | |
parent | bb2e8a89d2e4caf5345e565f4da5aeb6fc39655b (diff) | |
download | rspamd-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 { |