MADV_HUGEPAGE might not be available, for kernels before 2.6.38 (released 2011). Just skip the madvise.
closes https://github.com/official-stockfish/Stockfish/pull/3039
No functional change
size_t size = ((allocSize + alignment - 1) / alignment) * alignment; // multiple of alignment
if (posix_memalign(&mem, alignment, size))
mem = nullptr;
size_t size = ((allocSize + alignment - 1) / alignment) * alignment; // multiple of alignment
if (posix_memalign(&mem, alignment, size))
mem = nullptr;
+#if defined(MADV_HUGEPAGE)
madvise(mem, allocSize, MADV_HUGEPAGE);
madvise(mem, allocSize, MADV_HUGEPAGE);