diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-06-20 19:49:17 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-06-20 19:49:17 +0300 |
commit | f888a5310c1808902b4035ca3454b62bc5cf4434 (patch) | |
tree | 7425e11cdba27420d21468b0f79787834bd3c498 /src/nxt_http_parse.c | |
parent | c7ab908c19242a5ddd0233e123e8c2be210b3c02 (diff) | |
download | unit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.gz unit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.bz2 |
Using new memory pool implementation.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_parse.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c index 3e74461b..d5a43bd0 100644 --- a/src/nxt_http_parse.c +++ b/src/nxt_http_parse.c @@ -658,7 +658,7 @@ nxt_http_parse_field_end(nxt_http_request_parse_t *rp, u_char **pos, nxt_http_fields_hash_t * nxt_http_fields_hash_create(nxt_http_fields_hash_entry_t *entries, - nxt_mem_pool_t *mp) + nxt_mp_t *mp) { size_t min_length, max_length, length, size; nxt_uint_t i, j, n; @@ -687,7 +687,7 @@ nxt_http_fields_hash_create(nxt_http_fields_hash_entry_t *entries, * sizeof(nxt_http_fields_hash_elt_t *); } - hash = nxt_mem_zalloc(mp, size); + hash = nxt_mp_zget(mp, size); if (nxt_slow_path(hash == NULL)) { return NULL; } @@ -713,8 +713,7 @@ nxt_http_fields_hash_create(nxt_http_fields_hash_entry_t *entries, size = sizeof(nxt_http_fields_hash_elt_t) + nxt_align_size(length, 8); - elt = nxt_mem_zalloc(mp, n * size - + sizeof(nxt_http_fields_hash_elt_t)); + elt = nxt_mp_zget(mp, n * size + sizeof(nxt_http_fields_hash_elt_t)); if (nxt_slow_path(elt == NULL)) { return NULL; |