Skip to content
Permalink
Browse files
MDEV-21132: Use memcpy_aligned, memset_aligned
  • Loading branch information
dr-m committed Feb 12, 2020
1 parent 4b087e1 commit 2a6fa1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
@@ -60,11 +60,8 @@ buf_flush_note_modification(
ut_ad(mach_read_from_8(block->frame + FIL_PAGE_LSN) <= end_lsn);
mach_write_to_8(block->frame + FIL_PAGE_LSN, end_lsn);
if (UNIV_LIKELY_NULL(block->page.zip.data)) {
compile_time_assert(FIL_PAGE_LSN % 8 == 0);
*reinterpret_cast<uint64_t*>(FIL_PAGE_LSN
+ block->page.zip.data)
= *reinterpret_cast<const uint64_t*>(FIL_PAGE_LSN
+ block->frame);
memcpy_aligned<8>(FIL_PAGE_LSN + block->page.zip.data,
FIL_PAGE_LSN + block->frame, 8);
}

if (block->page.oldest_modification == 0) {
@@ -2122,8 +2122,7 @@ dberr_t PageConverter::operator()(buf_block_t* block) UNIV_NOTHROW

const bool full_crc32 = fil_space_t::full_crc32(get_space_flags());
byte* frame = get_frame(block);
compile_time_assert(FIL_PAGE_LSN % 8 == 0);
*reinterpret_cast<uint64_t*>(frame + FIL_PAGE_LSN)= 0;
memset_aligned<8>(frame + FIL_PAGE_LSN, 0, 8);

if (!block->page.zip.data) {
buf_flush_init_for_writing(

0 comments on commit 2a6fa1c

Please sign in to comment.