Clang format
This commit is contained in:
@@ -32,17 +32,17 @@ namespace snmalloc
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* Wrapper for wrapping values.
|
||||
*
|
||||
* Wraps on read. This allows code to trust the value is in range, even when
|
||||
* there is a memory corruption.
|
||||
*
|
||||
* Wraps on read. This allows code to trust the value is in range, even when
|
||||
* there is a memory corruption.
|
||||
**/
|
||||
template<size_t length, typename T>
|
||||
class Mod
|
||||
{
|
||||
static_assert(length == bits::next_pow2_const(length),
|
||||
"Must be a power of two.");
|
||||
static_assert(
|
||||
length == bits::next_pow2_const(length), "Must be a power of two.");
|
||||
|
||||
private:
|
||||
T value;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "../ds/helpers.h"
|
||||
#include "allocslab.h"
|
||||
#include "metaslab.h"
|
||||
#include "../ds/helpers.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace snmalloc
|
||||
@@ -102,7 +103,7 @@ namespace snmalloc
|
||||
{
|
||||
curr = (curr + meta[curr].next + 1) & (SLAB_COUNT - 1);
|
||||
}
|
||||
assert (curr == 0);
|
||||
assert(curr == 0);
|
||||
|
||||
for (auto i = 0; i < SLAB_COUNT; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user