Commit 48776590 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-12097 : avoid too large memory allocation in innodb buffer pool

on Windows

Align innodb_pool_size up to the innodb_buf_pool_chunk_unit.
parent bf262bd9
......@@ -1636,10 +1636,10 @@ innobase_start_or_create_for_mysql()
/* Do not allocate too large of a buffer pool on
Windows 32-bit systems, which can have trouble
allocating larger single contiguous memory blocks. */
srv_buf_pool_size = static_cast<ulint>(ut_uint64_align_up(srv_buf_pool_size, srv_buf_pool_chunk_unit));
srv_buf_pool_instances = ut_min(
static_cast<ulong>(MAX_BUFFER_POOLS),
static_cast<ulong>(srv_buf_pool_size
/ (128 * 1024 * 1024)));
static_cast<ulong>(srv_buf_pool_size / srv_buf_pool_chunk_unit));
#else /* defined(_WIN32) && !defined(_WIN64) */
/* Default to 8 instances when size > 1GB. */
srv_buf_pool_instances = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment