CR Feedback.

This commit is contained in:
Matthew Parkinson
2021-04-29 19:14:38 +01:00
committed by Matthew Parkinson
parent 208ab9a8e8
commit 5198821905
3 changed files with 18 additions and 16 deletions

View File

@@ -75,7 +75,8 @@ namespace snmalloc
* Return allocator for this object. This may perform amplification.
*/
template<typename LargeAlloc>
static alloc_id_t trunc_target_id(CapPtr<Remote, CBAlloc> r, LargeAlloc* large_allocator)
static alloc_id_t
trunc_target_id(CapPtr<Remote, CBAlloc> r, LargeAlloc* large_allocator)
{
#ifdef SNMALLOC_DONT_CACHE_ALLOCATOR_PTR
// Rederive allocator id.
@@ -248,7 +249,8 @@ namespace snmalloc
// Use the next N bits to spread out remote deallocs in our own
// slot.
size_t slot = get_slot<Alloc>(
Remote::trunc_target_id(r, &allocator->large_allocator), post_round);
Remote::trunc_target_id(r, &allocator->large_allocator),
post_round);
RemoteList* l = &list[slot];
l->last->non_atomic_next = r;
l->last = r;