aboutsummaryrefslogtreecommitdiffstats
path: root/src/statfile.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-08 19:09:51 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-08 19:09:51 +0400
commita1e2b2d84b185b5430252d7ead5806944be433af (patch)
treec1dcf94b6772aa0160cd3b5cc3be120f9f8ac7f2 /src/statfile.c
parent21f0f09256917dd5dff8d3cf4680322f96c67b7f (diff)
downloadrspamd-a1e2b2d84b185b5430252d7ead5806944be433af.tar.gz
rspamd-a1e2b2d84b185b5430252d7ead5806944be433af.zip
Make mlock option as tunable.
Diffstat (limited to 'src/statfile.c')
-rw-r--r--src/statfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/statfile.c b/src/statfile.c
index 0c1cee2e0..e5672f8fa 100644
--- a/src/statfile.c
+++ b/src/statfile.c
@@ -205,7 +205,7 @@ statfile_pool_expire (statfile_pool_t * pool)
}
statfile_pool_t *
-statfile_pool_new (memory_pool_t *pool, size_t max_size)
+statfile_pool_new (memory_pool_t *pool, size_t max_size, gboolean use_mlock)
{
statfile_pool_t *new;
@@ -214,7 +214,7 @@ statfile_pool_new (memory_pool_t *pool, size_t max_size)
new->max = max_size;
new->files = memory_pool_alloc0 (new->pool, STATFILES_MAX * sizeof (stat_file_t));
new->lock = memory_pool_get_mutex (new->pool);
- new->mlock_ok = TRUE;
+ new->mlock_ok = use_mlock;
return new;
}