summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authorDaan <daanl@outlook.com>2021-11-14 15:39:05 -0800
committerDaan <daanl@outlook.com>2021-11-14 15:39:05 -0800
commit18fc788201e9d27c3f22d4a5004031b92793a1fa (patch)
treee651edd45e07b5cb7e85fa22fc801470d90b52c8 /include/mimalloc-internal.h
parent5a05fd446a6656096fbff2ed1c464b70b57ec6a3 (diff)
parent4a590b1447e9d27e00dcd5bc9ac62eab6d7e51bb (diff)
merge from dev
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index cfe5847..f069230 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -276,11 +276,11 @@ static inline bool mi_malloc_satisfies_alignment(size_t alignment, size_t size)
#endif
static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) {
#if (SIZE_MAX == ULONG_MAX)
- return __builtin_umull_overflow(count, size, total);
+ return __builtin_umull_overflow(count, size, (unsigned long *)total);
#elif (SIZE_MAX == UINT_MAX)
- return __builtin_umul_overflow(count, size, total);
+ return __builtin_umul_overflow(count, size, (unsigned int *)total);
#else
- return __builtin_umulll_overflow(count, size, total);
+ return __builtin_umulll_overflow(count, size, (unsigned long long *)total);
#endif
}
#else /* __builtin_umul_overflow is unavailable */