Move to AAL/PAL bits and address_bits
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
e212ddd0e0
commit
15e3052087
@@ -30,12 +30,7 @@ namespace snmalloc
|
||||
|
||||
namespace bits
|
||||
{
|
||||
static constexpr size_t BITS = sizeof(size_t) * 8;
|
||||
|
||||
static constexpr bool is64()
|
||||
{
|
||||
return BITS == 64;
|
||||
}
|
||||
static constexpr size_t BITS = Aal::bits;
|
||||
|
||||
/**
|
||||
* Returns a value of type T that has a single bit set,
|
||||
@@ -52,8 +47,6 @@ namespace snmalloc
|
||||
return (static_cast<T>(1)) << shift;
|
||||
}
|
||||
|
||||
static constexpr size_t ADDRESS_BITS = is64() ? 48 : 32;
|
||||
|
||||
inline SNMALLOC_FAST_PATH size_t clz(size_t x)
|
||||
{
|
||||
SNMALLOC_ASSERT(x != 0); // Calling with 0 is UB on some implementations
|
||||
|
||||
Reference in New Issue
Block a user