[NFC] Automatic fixes from clang-tidy.
This commit is contained in:
@@ -98,7 +98,8 @@ namespace snmalloc
|
||||
{
|
||||
break;
|
||||
}
|
||||
size_t rsize = ((size_t)1 << SUPERSLAB_BITS) << large_class;
|
||||
size_t rsize = (static_cast<size_t>(1) << SUPERSLAB_BITS)
|
||||
<< large_class;
|
||||
size_t decommit_size = rsize - OS_PAGE_SIZE;
|
||||
// Grab all of the chunks of this size class.
|
||||
auto* slab = large_stack[large_class].pop_all();
|
||||
@@ -220,7 +221,7 @@ namespace snmalloc
|
||||
uintptr_t p0 = (uintptr_t)p;
|
||||
uintptr_t start = bits::align_up(p0, align);
|
||||
|
||||
if (start > (uintptr_t)p0)
|
||||
if (start > p0)
|
||||
{
|
||||
uintptr_t end = bits::align_down(p0 + request, align);
|
||||
*size = end - start;
|
||||
@@ -320,7 +321,7 @@ namespace snmalloc
|
||||
template<ZeroMem zero_mem = NoZero, AllowReserve allow_reserve = YesReserve>
|
||||
void* alloc(size_t large_class, size_t size)
|
||||
{
|
||||
size_t rsize = ((size_t)1 << SUPERSLAB_BITS) << large_class;
|
||||
size_t rsize = (static_cast<size_t>(1) << SUPERSLAB_BITS) << large_class;
|
||||
if (size == 0)
|
||||
size = rsize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user