Commit 2eb35749 authored by nia's avatar nia Committed by Daniel Black

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: default avatarNia Alarie <nia@NetBSD.org>
parent c80cecb5
...@@ -336,8 +336,10 @@ uchar *my_large_malloc(size_t *size, myf my_flags) ...@@ -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" # warning "No explicit large page (HUGETLB pages) support in Linux < 3.8"
#endif #endif
#elif defined(MAP_ALIGNED) #elif defined(MAP_ALIGNED)
mapflag|= MAP_ALIGNED_SUPER | mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
MAP_ALIGNED(my_bit_log2_size_t(large_page_size)); #if defined(MAP_ALIGNED_SUPER)
mapflag|= MAP_ALIGNED_SUPER;
#endif
#endif #endif
aligned_size= MY_ALIGN(*size, (size_t) large_page_size); aligned_size= MY_ALIGN(*size, (size_t) large_page_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