summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_mem_cache_pool.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-01-30 12:14:49 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-01-30 12:14:49 +0300
commit952291c93c96c1dc5b63576e0ee034efde998b18 (patch)
tree6f7555b7f566155c4ccf4ec40eaeae814ce8d55f /src/nxt_mem_cache_pool.c
parentba0391577b06446307fa073f856f57748557e0dd (diff)
downloadunit-952291c93c96c1dc5b63576e0ee034efde998b18.tar.gz
unit-952291c93c96c1dc5b63576e0ee034efde998b18.tar.bz2
Importing rbtree changes from nJScript.
Diffstat (limited to 'src/nxt_mem_cache_pool.c')
-rw-r--r--src/nxt_mem_cache_pool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_mem_cache_pool.c b/src/nxt_mem_cache_pool.c
index e949dff9..4f4502e0 100644
--- a/src/nxt_mem_cache_pool.c
+++ b/src/nxt_mem_cache_pool.c
@@ -123,7 +123,7 @@ static nxt_mem_cache_block_t *
nxt_mem_cache_alloc_cluster(nxt_mem_cache_pool_t *pool);
static void *nxt_mem_cache_alloc_large(nxt_mem_cache_pool_t *pool,
size_t alignment, size_t size);
-static nxt_int_t nxt_mem_cache_rbtree_compare(nxt_rbtree_node_t *node1,
+static intptr_t nxt_mem_cache_rbtree_compare(nxt_rbtree_node_t *node1,
nxt_rbtree_node_t *node2);
static nxt_mem_cache_block_t *nxt_mem_cache_find_block(nxt_rbtree_t *tree,
u_char *p);
@@ -202,7 +202,7 @@ nxt_mem_cache_pool_fast_create(size_t cluster_size, size_t page_alignment,
pool->chunk_size_shift = nxt_mem_cache_shift(min_chunk_size);
pool->page_size_shift = nxt_mem_cache_shift(page_size);
- nxt_rbtree_init(&pool->pages, nxt_mem_cache_rbtree_compare, NULL);
+ nxt_rbtree_init(&pool->pages, nxt_mem_cache_rbtree_compare);
nxt_queue_init(&pool->free_pages);
}
@@ -572,7 +572,7 @@ nxt_mem_cache_alloc_large(nxt_mem_cache_pool_t *pool, size_t alignment,
}
-static nxt_int_t
+static intptr_t
nxt_mem_cache_rbtree_compare(nxt_rbtree_node_t *node1, nxt_rbtree_node_t *node2)
{
nxt_mem_cache_block_t *block1, *block2;