From 3e0f1eb1fc16b23a55c399796d70acb453204225 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Tue, 20 Jul 2021 20:27:48 +0800 Subject: [PATCH] fast_mblock_init_ex1: unify obj name --- src/common_blocked_queue.c | 2 +- src/connection_pool.c | 4 ++-- src/sched_thread.c | 2 +- src/shared_buffer.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common_blocked_queue.c b/src/common_blocked_queue.c index 8945cf3..85718b1 100644 --- a/src/common_blocked_queue.c +++ b/src/common_blocked_queue.c @@ -34,7 +34,7 @@ int common_blocked_queue_init_ex(struct common_blocked_queue *queue, return result; } - if ((result=fast_mblock_init_ex1(&queue->mblock, "queue_node", + if ((result=fast_mblock_init_ex1(&queue->mblock, "queue-node", sizeof(struct common_blocked_node), alloc_elements_once, alloc_elements_limit, NULL, NULL, false)) != 0) diff --git a/src/connection_pool.c b/src/connection_pool.c index 5525c30..1bf69b5 100644 --- a/src/connection_pool.c +++ b/src/connection_pool.c @@ -47,14 +47,14 @@ int conn_pool_init_ex1(ConnectionPool *cp, int connect_timeout, cp->validate_callback.args = validate_args; init_capacity = htable_init_capacity > 0 ? htable_init_capacity : 256; - if ((result=fast_mblock_init_ex1(&cp->manager_allocator, "cpool_manager", + if ((result=fast_mblock_init_ex1(&cp->manager_allocator, "cpool-manager", sizeof(ConnectionManager), init_capacity, alloc_elements_limit, NULL, NULL, false)) != 0) { return result; } - if ((result=fast_mblock_init_ex1(&cp->node_allocator, "cpool_node", + if ((result=fast_mblock_init_ex1(&cp->node_allocator, "cpool-node", sizeof(ConnectionNode) + sizeof(ConnectionInfo) + extra_data_size, init_capacity, alloc_elements_limit, NULL, NULL, true)) != 0) diff --git a/src/sched_thread.c b/src/sched_thread.c index 60f2e30..bc323f3 100644 --- a/src/sched_thread.c +++ b/src/sched_thread.c @@ -716,7 +716,7 @@ int sched_start_ex(ScheduleArray *pScheduleArray, pthread_t *ptid, if (timer_slot_count > 0) { if ((result=fast_mblock_init_ex1(&pContext->delay_task_allocator, - "sched_delay_task", sizeof(FastDelayTask), + "sched-delay-task", sizeof(FastDelayTask), mblock_alloc_once, 0, NULL, NULL, true)) != 0) { free(pContext); diff --git a/src/shared_buffer.c b/src/shared_buffer.c index 2100244..e11b1a8 100644 --- a/src/shared_buffer.c +++ b/src/shared_buffer.c @@ -42,7 +42,7 @@ int shared_buffer_init_ex(SharedBufferContext *context, int result; context->buffer_init_capacity = buffer_init_capacity; - if ((result=fast_mblock_init_ex1(&context->allocator, "shared_buffer", + if ((result=fast_mblock_init_ex1(&context->allocator, "shared-buffer", sizeof(SharedBuffer), alloc_elements_once, alloc_elements_limit, shared_buffer_alloc_init, context, need_lock)) != 0)