fast_task_queue.c: set alloc_once gracefully
parent
679c8162fa
commit
a6901b5bca
|
|
@ -209,7 +209,7 @@ int free_queue_init_ex(const int max_connections, const int init_connections,
|
||||||
alloc_once = MAX_DATA_SIZE / g_free_queue.block_size;
|
alloc_once = MAX_DATA_SIZE / g_free_queue.block_size;
|
||||||
if (g_free_queue.alloc_task_once > alloc_once)
|
if (g_free_queue.alloc_task_once > alloc_once)
|
||||||
{
|
{
|
||||||
g_free_queue.alloc_task_once = alloc_once;
|
g_free_queue.alloc_task_once = alloc_once > 0 ? alloc_once : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue