Skip to content

Commit 3d3c197

Browse files
authored
Merge pull request #1655 from martin-frbg/issue1641
Fix apparent off-by-one error in calculation of MAX_ALLOCATING_THREADS
2 parents 24e3440 + 4e9c340 commit 3d3c197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/others/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ static const int allocation_block_size = BUFFER_SIZE + sizeof(struct alloc_t);
497497
#if defined(SMP) && !defined(USE_OPENMP)
498498
/* This is the number of threads than can be spawned by the server, which is the
499499
server plus the number of threads in the thread pool */
500-
# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER
500+
# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER +1
501501
static int next_memory_table_pos = 0;
502502
# if defined(HAS_COMPILER_TLS)
503503
/* Use compiler generated thread-local-storage */

0 commit comments

Comments
 (0)