summaryrefslogtreecommitdiff
path: root/storage/innobase/buf/buf0buf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/buf/buf0buf.cc')
-rw-r--r--storage/innobase/buf/buf0buf.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 6a2bc34c767..7f98be9e729 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1601,8 +1601,11 @@ buf_chunk_init(
opt_large_page_size is smaller than srv_page_size,
we may allocate one fewer block than requested. When
it is bigger, we may allocate more blocks than requested. */
+ static_assert(sizeof(byte*) == sizeof(ulint), "pointer size");
- frame = (byte*) ut_align(chunk->mem, srv_page_size);
+ frame = reinterpret_cast<byte*>((reinterpret_cast<ulint>(chunk->mem)
+ + srv_page_size - 1)
+ & ~(srv_page_size - 1));
chunk->size = (chunk->mem_pfx.m_size >> srv_page_size_shift)
- (frame != chunk->mem);