Commit 8678a105 authored by Daniel Black's avatar Daniel Black

MDEV-18946: innodb: buffer_pool - unallocate large pages requires size

MDEV-10814 introduce a bug where the size argument to
deallocate_large was passed true, evaluating to 1, as the size.

When this is passed to munmap this resulted in EINVAL and the
page not being released. This only occured the buf_pool_free_instance
when called on shutdown so no impact as the process termination
correctly frees the memory.
parent 51e48b9f
...@@ -2015,7 +2015,7 @@ buf_pool_free_instance( ...@@ -2015,7 +2015,7 @@ buf_pool_free_instance(
} }
buf_pool->allocator.deallocate_large( buf_pool->allocator.deallocate_large(
chunk->mem, &chunk->mem_pfx, true); chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);
} }
for (ulint i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; ++i) { for (ulint i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; ++i) {
...@@ -2893,7 +2893,7 @@ buf_pool_resize() ...@@ -2893,7 +2893,7 @@ buf_pool_resize()
} }
buf_pool->allocator.deallocate_large( buf_pool->allocator.deallocate_large(
chunk->mem, &chunk->mem_pfx, true); chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);
sum_freed += chunk->size; sum_freed += chunk->size;
......
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