Skip to content

Commit 8678a10

Browse files
committed
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.
1 parent 51e48b9 commit 8678a10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/innobase/buf/buf0buf.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ buf_pool_free_instance(
20152015
}
20162016

20172017
buf_pool->allocator.deallocate_large(
2018-
chunk->mem, &chunk->mem_pfx, true);
2018+
chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);
20192019
}
20202020

20212021
for (ulint i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; ++i) {
@@ -2893,7 +2893,7 @@ buf_pool_resize()
28932893
}
28942894

28952895
buf_pool->allocator.deallocate_large(
2896-
chunk->mem, &chunk->mem_pfx, true);
2896+
chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);
28972897

28982898
sum_freed += chunk->size;
28992899

0 commit comments

Comments
 (0)