aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-12-23 16:40:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-12-23 16:40:20 +0000
commit92abcea04fa67e69bb5951049e945356ceae4670 (patch)
treeb147dbe79dcc74c729f61a9262dd638d68637bc5 /src/lua
parente6c42dc71175916c01074f5605afc5b3257fe725 (diff)
downloadrspamd-92abcea04fa67e69bb5951049e945356ceae4670.tar.gz
rspamd-92abcea04fa67e69bb5951049e945356ceae4670.zip
[Project] Support mempool flags
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_mempool.c2
-rw-r--r--src/lua/lua_regexp.c2
-rw-r--r--src/lua/lua_url.c2
-rw-r--r--src/lua/lua_util.c8
-rw-r--r--src/lua/lua_worker.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/src/lua/lua_mempool.c b/src/lua/lua_mempool.c
index 06dcd2d5c..c376ee701 100644
--- a/src/lua/lua_mempool.c
+++ b/src/lua/lua_mempool.c
@@ -154,7 +154,7 @@ lua_mempool_create (lua_State *L)
{
LUA_TRACE_POINT;
struct memory_pool_s *mempool = rspamd_mempool_new (
- rspamd_mempool_suggest_size (), "lua"), **pmempool;
+ rspamd_mempool_suggest_size (), "lua", 0), **pmempool;
if (mempool) {
pmempool = lua_newuserdata (L, sizeof (struct memory_pool_s *));
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index c0458a876..70a5a5df4 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -891,7 +891,7 @@ luaopen_regexp (lua_State * L)
{
if (!regexp_static_pool) {
regexp_static_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
- "regexp_lua_pool");
+ "regexp_lua_pool", 0);
}
rspamd_lua_new_class (L, "rspamd{regexp}", regexplib_m);
diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c
index c0cfb49b8..0bd4f1c7e 100644
--- a/src/lua/lua_url.c
+++ b/src/lua/lua_url.c
@@ -731,7 +731,7 @@ lua_url_create (lua_State *L)
}
else {
own_pool = TRUE;
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "url");
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "url", 0);
text = luaL_checklstring (L, 1, &length);
}
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index ef9c3105e..b71339402 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -1386,7 +1386,7 @@ lua_util_parse_html (lua_State *L)
}
if (start != NULL) {
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL);
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
hc = rspamd_mempool_alloc0 (pool, sizeof (*hc));
in = g_byte_array_sized_new (len);
g_byte_array_append (in, start, len);
@@ -1456,7 +1456,8 @@ lua_util_parse_addr (lua_State *L)
}
}
else {
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "lua util");
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
+ "lua util", 0);
own_pool = TRUE;
}
@@ -1660,7 +1661,8 @@ lua_util_parse_mail_address (lua_State *L)
}
}
else {
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "lua util");
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
+ "lua util", 0);
own_pool = TRUE;
}
diff --git a/src/lua/lua_worker.c b/src/lua/lua_worker.c
index 4a3e4e908..17266ae96 100644
--- a/src/lua/lua_worker.c
+++ b/src/lua/lua_worker.c
@@ -423,7 +423,7 @@ lua_worker_add_control_handler (lua_State *L)
}
rspamd_mempool_t *pool = rspamd_mempool_new (
- rspamd_mempool_suggest_size (), "lua_control");
+ rspamd_mempool_suggest_size (), "lua_control", 0);
cbd = rspamd_mempool_alloc0 (pool, sizeof (*cbd));
cbd->pool = pool;
cbd->event_loop = event_loop;