Address review comments.

This commit is contained in:
Paul Liétar
2019-02-18 21:29:32 +00:00
parent 66400af419
commit ffe496dd18
3 changed files with 7 additions and 7 deletions

View File

@@ -150,7 +150,8 @@ namespace snmalloc
}
// Check we terminated traversal on a correctly aligned block
assert(((curr & ~1) - offset) % size == 0);
uint16_t start = remove_cache_friendly_offset(curr & ~1, sizeclass);
assert((start - offset) % size == 0);
if (curr != link)
{

View File

@@ -7,8 +7,7 @@ namespace snmalloc
constexpr static uint16_t get_slab_offset(uint8_t sc, bool is_short);
constexpr static size_t sizeclass_to_size(uint8_t sizeclass);
constexpr static size_t sizeclass_to_cache_friendly_mask(uint8_t sizeclass);
constexpr static size_t
sizeclass_to_inverse_cache_friendly_mask(uint8_t sizeclass);
constexpr static size_t sizeclass_to_inverse_cache_friendly_mask(uint8_t sc);
constexpr static uint16_t medium_slab_free(uint8_t sizeclass);
static inline uint8_t size_to_sizeclass(size_t size)