diff --git a/src/ds/bits.h b/src/ds/bits.h index 109eb26..960b3a3 100644 --- a/src/ds/bits.h +++ b/src/ds/bits.h @@ -1,6 +1,7 @@ #pragma once #include +#include #ifdef _MSC_VER # include diff --git a/src/mem/alloc.h b/src/mem/alloc.h index 52b7379..b59e4c9 100644 --- a/src/mem/alloc.h +++ b/src/mem/alloc.h @@ -522,7 +522,7 @@ namespace snmalloc { if constexpr ((location == End) || (location == OnePastEnd)) // We don't know the End, so return MAX_PTR - return (uintptr_t)~0; + return UINTPTR_MAX; else // We don't know the Start, so return MIN_PTR return 0; diff --git a/src/mem/metaslab.h b/src/mem/metaslab.h index ba99f81..020a11c 100644 --- a/src/mem/metaslab.h +++ b/src/mem/metaslab.h @@ -19,7 +19,7 @@ namespace snmalloc } }; - using SlabList = DLList; + using SlabList = DLList; static_assert( sizeof(SlabLink) <= MIN_ALLOC_SIZE,