Skip to content
Permalink
Browse files
my_largepage: Fix build with MAP_ALIGNED by no MAP_ALIGNED_SUPER
This needs backporting to MariaDB 10.5.

Any changes I submit are freely available under the new BSD
license.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
  • Loading branch information
alarixnia authored and grooverdan committed May 25, 2021
1 parent c80cecb commit 2eb3574
Showing 1 changed file with 4 additions and 2 deletions.
@@ -336,8 +336,10 @@ uchar *my_large_malloc(size_t *size, myf my_flags)
# warning "No explicit large page (HUGETLB pages) support in Linux < 3.8"
#endif
#elif defined(MAP_ALIGNED)
mapflag|= MAP_ALIGNED_SUPER |
MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
#if defined(MAP_ALIGNED_SUPER)
mapflag|= MAP_ALIGNED_SUPER;
#endif
#endif
aligned_size= MY_ALIGN(*size, (size_t) large_page_size);
}

0 comments on commit 2eb3574

Please sign in to comment.