mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
illumos support/build fix and large page support
This commit is contained in:
parent
4ecce78d66
commit
0c550d1626
3 changed files with 15 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue