Preserving inherited engine memory pool in controller process.

The pool is inherited from master process since changeset 854a1a440616.
This commit is contained in:
Max Romanov
2018-09-20 15:50:48 +03:00
parent a2eca97e89
commit 9f29ac9f3e

View File

@@ -132,19 +132,11 @@ nxt_controller_start(nxt_task_t *task, void *data)
nxt_str_t *json; nxt_str_t *json;
nxt_runtime_t *rt; nxt_runtime_t *rt;
nxt_conf_value_t *conf; nxt_conf_value_t *conf;
nxt_event_engine_t *engine;
nxt_conf_validation_t vldt; nxt_conf_validation_t vldt;
nxt_controller_init_t *init; nxt_controller_init_t *init;
rt = task->thread->runtime; rt = task->thread->runtime;
engine = task->thread->engine;
engine->mem_pool = nxt_mp_create(4096, 128, 1024, 64);
if (nxt_slow_path(engine->mem_pool == NULL)) {
return NXT_ERROR;
}
ret = nxt_http_fields_hash(&nxt_controller_fields_hash, rt->mem_pool, ret = nxt_http_fields_hash(&nxt_controller_fields_hash, rt->mem_pool,
nxt_controller_request_fields, nxt_controller_request_fields,
nxt_nitems(nxt_controller_request_fields)); nxt_nitems(nxt_controller_request_fields));