Fix error while allocating shared memory.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Wed, 13 Jan 2021 09:49:51 +0000 (18:49 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Wed, 13 Jan 2021 10:25:56 +0000 (19:25 +0900)
commit816f6ec87a965b983cec9ecd840d4e4d56758c6f
tree90906e7d424856ff0f0928cf4c79d635644197b4
parent53b9f32f7853c389838a56172965a948b0927dda
Fix error while allocating shared memory.

If num_init_children * max_pool is huge, pool_coninfo_size() failed to
calculate the size of required shared memory because the data type
used for the variable to store shared memory size was int and it
overflows for too large shared memory size. To fix this change
pool_coninfo_size() to size_t and use appropriate size_t for the
variable used within the function.

Also fix to use proper format qualifier in
pool_shared_memory_create().
src/context/pool_process_context.c
src/include/context/pool_process_context.h
src/utils/pool_shmem.c