Minor restructuring to move static_assert

This commit is contained in:
Matthew Parkinson
2019-01-21 17:53:30 +00:00
parent bb5027b454
commit 18dd15c2c0
2 changed files with 3 additions and 9 deletions

View File

@@ -110,6 +110,8 @@ namespace snmalloc
static constexpr size_t SUPERSLAB_BITS = SLAB_BITS + SLAB_COUNT_BITS;
static constexpr size_t RESERVE_SIZE = SUPERSLAB_SIZE * RESERVE_MULTIPLE;
static_assert((1ULL << SUPERSLAB_BITS) == SUPERSLAB_SIZE, "Sanity check");
// Number of slots for remote deallocation.
static constexpr size_t REMOTE_SLOT_BITS = 6;
static constexpr size_t REMOTE_SLOTS = 1 << REMOTE_SLOT_BITS;