diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-06-30 15:19:26 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-06-30 15:35:43 +0000 |
commit | 4877659006757904624f5e97c67eec2d64f67f59 (patch) | |
tree | 4ed1e858036051f23f9560902a79de07b3610ee2 | |
parent | bf262bd957025e1161e989e0431615858ee2d8cd (diff) | |
download | mariadb-git-4877659006757904624f5e97c67eec2d64f67f59.tar.gz |
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.
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 399d02e7395..072a5c67bc7 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -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; |