Clangformat.
This commit is contained in:
@@ -1070,8 +1070,7 @@ namespace snmalloc
|
||||
bool was_full = super->is_full();
|
||||
SlabList* sl = &small_classes[sizeclass];
|
||||
Slab* slab = Metaslab::get_slab(p);
|
||||
Superslab::Action a =
|
||||
slab->dealloc_slow(sl, super, p);
|
||||
Superslab::Action a = slab->dealloc_slow(sl, super, p);
|
||||
if (likely(a == Superslab::NoSlabReturn))
|
||||
return;
|
||||
stats().sizeclass_dealloc_slab(sizeclass);
|
||||
|
||||
@@ -403,13 +403,14 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
// Cross-reference largealloc's alloc() decommitted condition.
|
||||
if ((decommit_strategy != DecommitNone)
|
||||
&& (large_class != 0 || decommit_strategy == DecommitSuper))
|
||||
if (
|
||||
(decommit_strategy != DecommitNone) &&
|
||||
(large_class != 0 || decommit_strategy == DecommitSuper))
|
||||
{
|
||||
size_t rsize = bits::one_at_bit(SUPERSLAB_BITS) << large_class;
|
||||
|
||||
memory_provider.notify_not_using(
|
||||
pointer_offset(p, OS_PAGE_SIZE), rsize - OS_PAGE_SIZE);
|
||||
pointer_offset(p, OS_PAGE_SIZE), rsize - OS_PAGE_SIZE);
|
||||
}
|
||||
|
||||
stats.superslab_push();
|
||||
|
||||
@@ -178,8 +178,8 @@ namespace snmalloc
|
||||
// This does not need to remove the "use" as done by the fast path.
|
||||
// Returns a complex return code for managing the superslab meta data.
|
||||
// i.e. This deallocation could make an entire superslab free.
|
||||
SNMALLOC_SLOW_PATH typename Superslab::Action dealloc_slow(
|
||||
SlabList* sl, Superslab* super, void* p)
|
||||
SNMALLOC_SLOW_PATH typename Superslab::Action
|
||||
dealloc_slow(SlabList* sl, Superslab* super, void* p)
|
||||
{
|
||||
Metaslab& meta = super->get_meta(this);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace snmalloc
|
||||
{
|
||||
if (kind != Fresh)
|
||||
{
|
||||
// If this wasn't previously Fresh, we need to zero some things.
|
||||
// If this wasn't previously Fresh, we need to zero some things.
|
||||
used = 0;
|
||||
for (size_t i = 0; i < SLAB_COUNT; i++)
|
||||
{
|
||||
@@ -105,7 +105,8 @@ namespace snmalloc
|
||||
{
|
||||
curr = (curr + meta[curr].next + 1) & (SLAB_COUNT - 1);
|
||||
}
|
||||
if (curr != 0) abort();
|
||||
if (curr != 0)
|
||||
abort();
|
||||
|
||||
for (size_t i = 0; i < SLAB_COUNT; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user