summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_controller.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-10-04 14:58:13 +0300
committerMax Romanov <max.romanov@nginx.com>2017-10-04 14:58:13 +0300
commit414d508e04d26ebef0e3e1ba4ed518b11d3af1a0 (patch)
treecb580219c1a313021e8c56f3a1abed9dfe1b15f0 /src/nxt_controller.c
parentba311997866a4c2ef6ceeaac846832a85bd86f17 (diff)
downloadunit-414d508e04d26ebef0e3e1ba4ed518b11d3af1a0.tar.gz
unit-414d508e04d26ebef0e3e1ba4ed518b11d3af1a0.tar.bz2
Using engine memiory pool for port write allocations.
To allow use port from different threads, the first step is to avoid using port's memory pool for temporary allocations required to send data through the port. Including but not limited by: - buffers for data; - send message structures; - new mmap fd notifications; It is still safe to use port memory pool for incoming buffers allocations because recieve operation bound to single thread.
Diffstat (limited to 'src/nxt_controller.c')
-rw-r--r--src/nxt_controller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c
index d7a3d1a7..4a0d065b 100644
--- a/src/nxt_controller.c
+++ b/src/nxt_controller.c
@@ -1032,7 +1032,7 @@ nxt_controller_conf_store(nxt_task_t *task, nxt_conf_value_t *conf)
size = nxt_conf_json_length(conf, NULL);
- b = nxt_buf_mem_alloc(main_port->mem_pool, size, 0);
+ b = nxt_buf_mem_ts_alloc(task, task->thread->engine->mem_pool, size);
if (nxt_fast_path(b != NULL)) {
b->mem.free = nxt_conf_json_print(b->mem.free, conf, NULL);