summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_upstream_round_robin.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-06-20 19:49:17 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-06-20 19:49:17 +0300
commitf888a5310c1808902b4035ca3454b62bc5cf4434 (patch)
tree7425e11cdba27420d21468b0f79787834bd3c498 /src/nxt_upstream_round_robin.c
parentc7ab908c19242a5ddd0233e123e8c2be210b3c02 (diff)
downloadunit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.gz
unit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.bz2
Using new memory pool implementation.
Diffstat (limited to '')
-rw-r--r--src/nxt_upstream_round_robin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_upstream_round_robin.c b/src/nxt_upstream_round_robin.c
index 480f7eb8..089f22b1 100644
--- a/src/nxt_upstream_round_robin.c
+++ b/src/nxt_upstream_round_robin.c
@@ -72,15 +72,15 @@ nxt_upstream_round_robin_create(nxt_task_t *task, void *obj, void *data)
jbs = obj;
up = jbs->resolve.job.data;
- urr = nxt_mem_zalloc(up->mem_pool, sizeof(nxt_upstream_round_robin_t));
+ urr = nxt_mp_zget(up->mem_pool, sizeof(nxt_upstream_round_robin_t));
if (nxt_slow_path(urr == NULL)) {
goto fail;
}
urr->npeers = jbs->resolve.count;
- peer = nxt_mem_zalloc(up->mem_pool,
- urr->npeers * sizeof(nxt_upstream_round_robin_peer_t));
+ peer = nxt_mp_zget(up->mem_pool,
+ urr->npeers * sizeof(nxt_upstream_round_robin_peer_t));
if (nxt_slow_path(peer == NULL)) {
goto fail;
}