Home
last modified time | relevance | path

Searched refs:mp (Results 1 – 25 of 84) sorted by last modified time

1234

/unit/src/
H A Dnxt_var.c330 nxt_var_compile(nxt_str_t *str, nxt_mp_t *mp, nxt_array_t *fields) in nxt_var_compile() argument
359 var = nxt_mp_get(mp, size); in nxt_var_compile()
H A Dnxt_var.h18 typedef int64_t (*nxt_var_field_hash_t)(nxt_mp_t *mp, nxt_str_t *str);
47 nxt_var_t *nxt_var_compile(nxt_str_t *str, nxt_mp_t *mp, nxt_array_t *fields);
H A Dnxt_tstr.c55 nxt_tstr_state_new(nxt_mp_t *mp, nxt_bool_t test) in nxt_tstr_state_new() argument
59 state = nxt_mp_get(mp, sizeof(nxt_tstr_state_t)); in nxt_tstr_state_new()
64 state->pool = mp; in nxt_tstr_state_new()
67 state->var_fields = nxt_array_create(mp, 4, sizeof(nxt_var_field_t)); in nxt_tstr_state_new()
73 state->jcf = nxt_js_conf_new(mp); in nxt_tstr_state_new()
217 nxt_tstr_cache_t *cache, void *ctx, nxt_mp_t *mp) in nxt_tstr_query_init() argument
224 query = nxt_mp_zget(mp, sizeof(nxt_tstr_query_t)); in nxt_tstr_query_init()
230 query->pool = mp; in nxt_tstr_query_init()
H A Dnxt_runtime.h124 nxt_str_t *nxt_current_directory(nxt_mp_t *mp);
H A Dnxt_router_access_log.c331 nxt_mp_t *mp; in nxt_router_access_log_reopen_handler() local
346 mp = nxt_mp_create(1024, 128, 256, 32); in nxt_router_access_log_reopen_handler()
347 if (nxt_slow_path(mp == NULL)) { in nxt_router_access_log_reopen_handler()
351 reopen = nxt_mp_get(mp, sizeof(nxt_router_access_log_reopen_t)); in nxt_router_access_log_reopen_handler()
356 reopen->mem_pool = mp; in nxt_router_access_log_reopen_handler()
359 b = nxt_buf_mem_alloc(mp, access_log->path.length + 1, 0); in nxt_router_access_log_reopen_handler()
389 nxt_mp_retain(mp); in nxt_router_access_log_reopen_handler()
395 nxt_mp_destroy(mp); in nxt_router_access_log_reopen_handler()
402 nxt_mp_t *mp; in nxt_router_access_log_reopen_completion() local
406 mp = b->data; in nxt_router_access_log_reopen_completion()
[all …]
H A Dnxt_tstr.h40 nxt_tstr_state_t *nxt_tstr_state_new(nxt_mp_t *mp, nxt_bool_t test);
51 nxt_mp_t *mp);
H A Dnxt_router.c81 nxt_mp_t *mp);
110 nxt_mp_t *mp, nxt_conf_value_t *conf);
1047 nxt_mp_t *mp, *tmp; in nxt_router_temp_conf() local
1052 if (nxt_slow_path(mp == NULL)) { in nxt_router_temp_conf()
1061 rtcf->mem_pool = mp; in nxt_router_temp_conf()
1114 nxt_mp_destroy(mp); in nxt_router_temp_conf()
1592 mp = rtcf->mem_pool; in nxt_router_conf_create()
2110 nxt_mp_t *mp; in nxt_router_conf_process_static() local
2118 mp = rtcf->mem_pool; in nxt_router_conf_process_static()
2789 nxt_mp_t *mp; in nxt_router_tls_rpc_handler() local
[all …]
H A Dnxt_http_static.c78 nxt_mp_t *mp; in nxt_http_static_init() local
86 mp = rtcf->mem_pool; in nxt_http_static_init()
88 conf = nxt_mp_zget(mp, sizeof(nxt_http_static_conf_t)); in nxt_http_static_init()
97 conf->shares = nxt_mp_zget(mp, sizeof(nxt_http_static_share_t) in nxt_http_static_init()
122 ret = nxt_str_dup(mp, &conf->index, &str); in nxt_http_static_init()
175 action->fallback = nxt_mp_alloc(mp, sizeof(nxt_http_action_t)); in nxt_http_static_init()
928 nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash) in nxt_http_static_mtypes_init() argument
1006 ret = nxt_http_static_mtypes_hash_add(mp, hash, &exten, type); in nxt_http_static_mtypes_init()
1033 nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash, in nxt_http_static_mtypes_hash_add() argument
1039 mtype = nxt_mp_get(mp, sizeof(nxt_http_static_mtype_t)); in nxt_http_static_mtypes_hash_add()
[all …]
H A Dnxt_js.c28 nxt_js_conf_new(nxt_mp_t *mp) in nxt_js_conf_new() argument
33 jcf = nxt_mp_zget(mp, sizeof(nxt_js_conf_t)); in nxt_js_conf_new()
38 jcf->pool = mp; in nxt_js_conf_new()
47 jcf->funcs = nxt_array_create(mp, 4, sizeof(nxt_str_t)); in nxt_js_conf_new()
H A Dnxt_js.h24 nxt_js_conf_t *nxt_js_conf_new(nxt_mp_t *mp);
H A Dnxt_http_return.c25 static nxt_int_t nxt_http_return_encode(nxt_mp_t *mp, nxt_str_t *encoded,
38 nxt_mp_t *mp; in nxt_http_return_init() local
42 mp = rtcf->mem_pool; in nxt_http_return_init()
44 conf = nxt_mp_zget(mp, sizeof(nxt_http_return_conf_t)); in nxt_http_return_init()
67 return nxt_http_return_encode(mp, &conf->encoded, &str); in nxt_http_return_init()
151 nxt_http_return_encode(nxt_mp_t *mp, nxt_str_t *encoded, in nxt_http_return_encode() argument
165 encoded->start = nxt_mp_nget(mp, encoded->length); in nxt_http_return_encode()
H A Dnxt_http_route.c239 nxt_mp_t *mp; in nxt_http_routes_create() local
250 mp = tmcf->router_conf->mem_pool; in nxt_http_routes_create()
252 routes = nxt_mp_alloc(mp, size); in nxt_http_routes_create()
398 nxt_mp_t *mp; in nxt_http_route_match_create() local
418 match = nxt_mp_alloc(mp, size); in nxt_http_route_match_create()
643 nxt_mp_t *mp; in nxt_http_action_init() local
660 mp = rtcf->mem_pool; in nxt_http_action_init()
700 table = nxt_mp_alloc(mp, size); in nxt_http_route_table_create()
816 rule = nxt_mp_alloc(mp, size); in nxt_http_route_rule_create()
1491 nxt_mp_t *mp; in nxt_http_action_create() local
[all …]
H A Dnxt_http_request.c107 nxt_http_validate_host(nxt_str_t *host, nxt_mp_t *mp) in nxt_http_validate_host() argument
187 host->start = nxt_mp_nget(mp, host_length); in nxt_http_validate_host()
246 nxt_mp_t *mp; in nxt_http_request_create() local
250 mp = nxt_mp_create(4096, 128, 512, 32); in nxt_http_request_create()
251 if (nxt_slow_path(mp == NULL)) { in nxt_http_request_create()
265 last = nxt_mp_zget(mp, NXT_BUF_SYNC_SIZE); in nxt_http_request_create()
276 r->mem_pool = mp; in nxt_http_request_create()
285 r->tstr_cache.var.pool = mp; in nxt_http_request_create()
291 nxt_mp_release(mp); in nxt_http_request_create()
1120 str.start = nxt_mp_nget(mp, str.length); in nxt_http_field_hash()
[all …]
H A Dnxt_http.h343 int64_t nxt_http_field_hash(nxt_mp_t *mp, nxt_str_t *name,
345 int64_t nxt_http_argument_hash(nxt_mp_t *mp, nxt_str_t *name);
346 int64_t nxt_http_header_hash(nxt_mp_t *mp, nxt_str_t *name);
347 int64_t nxt_http_cookie_hash(nxt_mp_t *mp, nxt_str_t *name);
355 nxt_int_t nxt_http_pass_segments(nxt_mp_t *mp, nxt_str_t *pass,
360 nxt_task_t *task, nxt_mp_t *mp, nxt_conf_value_t *cv);
364 nxt_mp_t *mp, nxt_conf_value_t *types);
383 nxt_int_t nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash);
384 nxt_int_t nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash,
396 nxt_int_t nxt_http_proxy_init(nxt_mp_t *mp, nxt_http_action_t *action,
H A Dnxt_conf.h94 NXT_EXPORT nxt_int_t nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value,
97 nxt_conf_op_ret_t nxt_conf_op_compile(nxt_mp_t *mp, nxt_conf_op_t **ops,
100 nxt_conf_value_t *nxt_conf_clone(nxt_mp_t *mp, nxt_conf_op_t *op,
103 nxt_conf_value_t *nxt_conf_json_parse(nxt_mp_t *mp, u_char *start, u_char *end,
106 #define nxt_conf_json_parse_str(mp, str) \ argument
107 nxt_conf_json_parse(mp, (str)->start, (str)->start + (str)->length, NULL)
121 nxt_mp_t *mp, const nxt_str_t *str);
127 nxt_conf_value_t *nxt_conf_create_object(nxt_mp_t *mp, nxt_uint_t count);
130 nxt_int_t nxt_conf_set_member_dup(nxt_conf_value_t *object, nxt_mp_t *mp,
134 nxt_int_t nxt_conf_set_member_string_dup(nxt_conf_value_t *object, nxt_mp_t *mp,
[all …]
H A Dnxt_main_process.c774 nxt_mp_t *mp; in nxt_main_process_sigusr1_handler() local
794 mp = nxt_mp_create(1024, 128, 256, 32); in nxt_main_process_sigusr1_handler()
795 if (mp == NULL) { in nxt_main_process_sigusr1_handler()
803 nxt_mp_destroy(mp); in nxt_main_process_sigusr1_handler()
847 nxt_mp_destroy(mp); in nxt_main_process_sigusr1_handler()
865 nxt_mp_destroy(mp); in nxt_main_process_sigusr1_handler()
1268 nxt_mp_t *mp; in nxt_main_port_modules_handler() local
1306 mp = nxt_mp_create(1024, 128, 256, 32); in nxt_main_port_modules_handler()
1307 if (mp == NULL) { in nxt_main_port_modules_handler()
1311 b = nxt_buf_chk_make_plain(mp, b, msg->size); in nxt_main_port_modules_handler()
[all …]
H A Dnxt_string.h119 NXT_EXPORT nxt_str_t *nxt_str_alloc(nxt_mp_t *mp, size_t length);
120 NXT_EXPORT nxt_str_t *nxt_str_dup(nxt_mp_t *mp, nxt_str_t *dst,
122 NXT_EXPORT char *nxt_str_cstrz(nxt_mp_t *mp, const nxt_str_t *src);
H A Dnxt_string.c11 nxt_str_alloc(nxt_mp_t *mp, size_t length) in nxt_str_alloc() argument
16 s = nxt_mp_get(mp, sizeof(nxt_str_t) + length); in nxt_str_alloc()
34 nxt_str_dup(nxt_mp_t *mp, nxt_str_t *dst, const nxt_str_t *src) in nxt_str_dup() argument
40 dst = nxt_mp_get(mp, sizeof(nxt_str_t) + src->length); in nxt_str_dup()
50 dst->start = nxt_mp_nget(mp, src->length); in nxt_str_dup()
71 nxt_str_cstrz(nxt_mp_t *mp, const nxt_str_t *src) in nxt_str_cstrz() argument
75 dst = nxt_mp_alloc(mp, src->length + 1); in nxt_str_cstrz()
H A Dnxt_sockaddr.c79 sa = nxt_mp_zalloc(mp, size); in nxt_sockaddr_alloc()
147 sa = nxt_sockaddr_alloc(mp, size, address_length); in nxt_sockaddr_create()
166 nxt_sockaddr_copy(nxt_mp_t *mp, nxt_sockaddr_t *src) in nxt_sockaddr_copy() argument
173 dst = nxt_mp_alloc(mp, length); in nxt_sockaddr_copy()
524 nxt_sockaddr_parse(nxt_mp_t *mp, nxt_str_t *addr) in nxt_sockaddr_parse() argument
528 sa = nxt_sockaddr_parse_optport(mp, addr); in nxt_sockaddr_parse()
554 sa = nxt_sockaddr_unix_parse(mp, addr); in nxt_sockaddr_parse_optport()
557 sa = nxt_sockaddr_inet6_parse(mp, addr); in nxt_sockaddr_parse_optport()
560 sa = nxt_sockaddr_inet_parse(mp, addr); in nxt_sockaddr_parse_optport()
572 nxt_sockaddr_unix_parse(nxt_mp_t *mp, nxt_str_t *addr) in nxt_sockaddr_unix_parse() argument
[all …]
H A Dnxt_http_route_addr.c17 nxt_http_route_addr_pattern_parse(nxt_mp_t *mp, in nxt_http_route_addr_pattern_parse() argument
H A Dnxt_openssl.c70 nxt_conf_value_t *value, nxt_mp_t *mp);
74 nxt_tls_init_t *tls_init, nxt_mp_t *mp);
81 nxt_tls_conf_t *conf, nxt_mp_t *mp);
451 nxt_mp_t *mp, nxt_bool_t single) argument
548 nxt_mp_t *mp) argument
581 zcmd = nxt_str_cstrz(mp, &cmd);
582 zvalue = nxt_str_cstrz(mp, &value);
630 nxt_mp_t *mp) argument
850 nxt_mp_t *mp) argument
937 mp)
[all …]
H A Dnxt_http_parse.c110 nxt_http_parse_request_init(nxt_http_request_parse_t *rp, nxt_mp_t *mp) in nxt_http_parse_request_init() argument
112 rp->mem_pool = mp; in nxt_http_parse_request_init()
114 rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t)); in nxt_http_parse_request_init()
H A Dnxt_controller.c46 nxt_str_t *str, nxt_mp_t *mp);
224 nxt_mp_t *mp) in nxt_controller_file_read() argument
298 nxt_mp_t *mp; in nxt_controller_start() local
340 nxt_mp_destroy(mp); in nxt_controller_start()
348 nxt_mp_destroy(mp); in nxt_controller_start()
353 vldt.conf_pool = mp; in nxt_controller_start()
486 nxt_mp_t *mp; in nxt_controller_conf_default() local
1325 vldt.conf_pool = mp; in nxt_controller_process_config()
1353 req->conf.pool = mp; in nxt_controller_process_config()
1408 vldt.conf_pool = mp; in nxt_controller_process_config()
[all …]
H A Dnxt_h1proto.c2130 nxt_mp_t *mp; in nxt_h1p_peer_connect() local
2143 mp = nxt_mp_create(1024, 128, 256, 32); in nxt_h1p_peer_connect()
2145 if (nxt_slow_path(mp == NULL)) { in nxt_h1p_peer_connect()
2149 h1p = nxt_mp_zalloc(mp, sizeof(nxt_h1proto_t)); in nxt_h1p_peer_connect()
2159 c = nxt_conn_create(mp, task); in nxt_h1p_peer_connect()
2164 c->mem_pool = mp; in nxt_h1p_peer_connect()
/unit/src/test/
H A Dnxt_http_parse_test.c656 nxt_mp_t *mp; in nxt_http_parse_test_bench() local
675 mp = nxt_mp_create(1024, 128, 256, 32); in nxt_http_parse_test_bench()
676 if (nxt_slow_path(mp == NULL)) { in nxt_http_parse_test_bench()
680 if (nxt_slow_path(nxt_http_parse_request_init(&rp, mp) != NXT_OK)) { in nxt_http_parse_test_bench()
701 nxt_mp_destroy(mp); in nxt_http_parse_test_bench()

1234