illumos support/build fix and large page support

This commit is contained in:
David Carlier 2020-07-10 03:23:20 +01:00
parent 4ecce78d66
commit 0c550d1626
3 changed files with 15 additions and 1 deletions

View file

@ -241,6 +241,10 @@ static inline bool mi_malloc_satisfies_alignment(size_t alignment, size_t size)
static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) {
#if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5
#include <limits.h> // UINT_MAX, ULONG_MAX
#if defined(_CLOCK_T)
#undef _CLOCK_T
#endif
#if (SIZE_MAX == UINT_MAX)
return __builtin_umul_overflow(count, size, total);
#elif (SIZE_MAX == ULONG_MAX)