fast_mblock_init_ex1: unify obj name
parent
6a40a92725
commit
2d71c389f6
|
|
@ -129,7 +129,7 @@ static int idempotency_channel_alloc_init(void *element, void *args)
|
||||||
|
|
||||||
channel = (IdempotencyClientChannel *)element;
|
channel = (IdempotencyClientChannel *)element;
|
||||||
if ((result=fast_mblock_init_ex1(&channel->receipt_allocator,
|
if ((result=fast_mblock_init_ex1(&channel->receipt_allocator,
|
||||||
"idempotency_receipt", sizeof(IdempotencyClientReceipt),
|
"idempotency-receipt", sizeof(IdempotencyClientReceipt),
|
||||||
1024, 0, NULL, NULL, true)) != 0)
|
1024, 0, NULL, NULL, true)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -153,7 +153,7 @@ int client_channel_init(IniFullContext *ini_ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((result=fast_mblock_init_ex1(&channel_context.channel_allocator,
|
if ((result=fast_mblock_init_ex1(&channel_context.channel_allocator,
|
||||||
"channel_info", sizeof(IdempotencyClientChannel),
|
"channel-info", sizeof(IdempotencyClientChannel),
|
||||||
64, 0, idempotency_channel_alloc_init, NULL, true)) != 0)
|
64, 0, idempotency_channel_alloc_init, NULL, true)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ int idempotency_channel_init(const uint32_t max_channel_id,
|
||||||
element_size = sizeof(IdempotencyChannel) + sizeof(IdempotencyRequest *) *
|
element_size = sizeof(IdempotencyChannel) + sizeof(IdempotencyRequest *) *
|
||||||
request_htable_capacity;
|
request_htable_capacity;
|
||||||
if ((result=fast_mblock_init_ex1(&channel_context.channel_allocator,
|
if ((result=fast_mblock_init_ex1(&channel_context.channel_allocator,
|
||||||
"channel_info", element_size, 1024, max_channel_id,
|
"channel-info", element_size, 1024, max_channel_id,
|
||||||
idempotency_channel_alloc_init, NULL, true)) != 0)
|
idempotency_channel_alloc_init, NULL, true)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -671,7 +671,7 @@ int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread,
|
||||||
if (use_fixed_buffer_size) {
|
if (use_fixed_buffer_size) {
|
||||||
element_size += max_record_size;
|
element_size += max_record_size;
|
||||||
}
|
}
|
||||||
if ((result=fast_mblock_init_ex1(&thread->mblock, "binlog_wbuffer",
|
if ((result=fast_mblock_init_ex1(&thread->mblock, "binlog-wbuffer",
|
||||||
element_size, alloc_elements_once, 0,
|
element_size, alloc_elements_once, 0,
|
||||||
binlog_wbuffer_alloc_init, writer, true)) != 0)
|
binlog_wbuffer_alloc_init, writer, true)) != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ typedef struct binlog_writer_thread {
|
||||||
struct fast_mblock_man mblock;
|
struct fast_mblock_man mblock;
|
||||||
struct fc_queue queue;
|
struct fc_queue queue;
|
||||||
char name[64];
|
char name[64];
|
||||||
bool running;
|
volatile bool running;
|
||||||
bool use_fixed_buffer_size;
|
bool use_fixed_buffer_size;
|
||||||
short order_mode;
|
short order_mode;
|
||||||
short order_by;
|
short order_by;
|
||||||
|
|
|
||||||
|
|
@ -861,7 +861,7 @@ int sf_connection_manager_prepare(SFConnectionManager *cm)
|
||||||
element_size = sizeof(SFCMServerPtrArray) +
|
element_size = sizeof(SFCMServerPtrArray) +
|
||||||
sizeof(SFCMServerEntry *) * cm->max_servers_per_group;
|
sizeof(SFCMServerEntry *) * cm->max_servers_per_group;
|
||||||
if ((result=fast_mblock_init_ex1(&cm->sptr_array_allocator,
|
if ((result=fast_mblock_init_ex1(&cm->sptr_array_allocator,
|
||||||
"server_ptr_array", element_size, 4 * 1024, 0,
|
"server-ptr-array", element_size, 4 * 1024, 0,
|
||||||
sptr_array_alloc_init, NULL, true)) != 0)
|
sptr_array_alloc_init, NULL, true)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ static int init_allocators(SFHtableShardingContext *sharding_ctx,
|
||||||
|
|
||||||
end = sharding_ctx->allocators.elts + allocator_count;
|
end = sharding_ctx->allocators.elts + allocator_count;
|
||||||
for (pa=sharding_ctx->allocators.elts; pa<end; pa++) {
|
for (pa=sharding_ctx->allocators.elts; pa<end; pa++) {
|
||||||
if ((result=fast_mblock_init_ex1(pa, "sharding_hkey", element_size,
|
if ((result=fast_mblock_init_ex1(pa, "sharding-hkey", element_size,
|
||||||
alloc_elts_once, 0, NULL, NULL, true)) != 0)
|
alloc_elts_once, 0, NULL, NULL, true)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue