summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_list.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_list.c
parentc7ab908c19242a5ddd0233e123e8c2be210b3c02 (diff)
downloadunit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.gz
unit-f888a5310c1808902b4035ca3454b62bc5cf4434.tar.bz2
Using new memory pool implementation.
Diffstat (limited to 'src/nxt_list.c')
-rw-r--r--src/nxt_list.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_list.c b/src/nxt_list.c
index 6ba7c9fa..9a44ce9a 100644
--- a/src/nxt_list.c
+++ b/src/nxt_list.c
@@ -8,11 +8,11 @@
nxt_list_t *
-nxt_list_create(nxt_mem_pool_t *mp, nxt_uint_t n, size_t size)
+nxt_list_create(nxt_mp_t *mp, nxt_uint_t n, size_t size)
{
nxt_list_t *list;
- list = nxt_mem_alloc(mp, sizeof(nxt_list_t) + n * size);
+ list = nxt_mp_get(mp, sizeof(nxt_list_t) + n * size);
if (nxt_fast_path(list != NULL)) {
list->last = &list->part;
@@ -39,8 +39,8 @@ nxt_list_add(nxt_list_t *list)
/* The last list part is filled up, allocating a new list part. */
- last = nxt_mem_alloc(list->mem_pool,
- sizeof(nxt_list_part_t) + list->nalloc * list->size);
+ last = nxt_mp_get(list->mem_pool,
+ sizeof(nxt_list_part_t) + list->nalloc * list->size);
if (nxt_slow_path(last == NULL)) {
return NULL;