SP: plumb CapPtr through cache_friendly functions
Change these functions from being void* to void* to either consuming or producing FreeObject*-s as appropriate.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
97f508e2b3
commit
c5aff8ed74
@@ -176,8 +176,7 @@ namespace snmalloc
|
||||
self->remove();
|
||||
self->set_full(Metaslab::get_slab(n));
|
||||
|
||||
void* p =
|
||||
remove_cache_friendly_offset(n.unsafe_capptr, self->sizeclass());
|
||||
auto p = remove_cache_friendly_offset(n, self->sizeclass());
|
||||
SNMALLOC_ASSERT(is_start_of_object(self, address_cast(p)));
|
||||
|
||||
self->debug_slab_invariant(Metaslab::get_slab(n), entropy);
|
||||
@@ -194,7 +193,7 @@ namespace snmalloc
|
||||
UNUSED(rsize);
|
||||
}
|
||||
|
||||
return CapPtr<void, CBArena>(p);
|
||||
return p;
|
||||
}
|
||||
|
||||
void debug_slab_invariant(CapPtr<Slab, CBArena> slab, LocalEntropy& entropy)
|
||||
|
||||
Reference in New Issue
Block a user