Eliminate pointer_cast()
Since we anticipate address_t not carrying provenance on CHERI, but rather being vaddr_t there, it doesn't make sense to offer conversion back to a provenance-carrying pointer. Thankfully, there is not much to be done here: the uses were few and could be replaced with the vocabulary of other pointer operations in ds/address.h
This commit is contained in:
@@ -181,8 +181,8 @@ namespace snmalloc
|
||||
Slab* alloc_slab(sizeclass_t sizeclass)
|
||||
{
|
||||
uint8_t h = head;
|
||||
Slab* slab = pointer_cast<Slab>(
|
||||
address_cast(this) + (static_cast<size_t>(h) << SLAB_BITS));
|
||||
Slab* slab = pointer_offset(
|
||||
reinterpret_cast<Slab*>(this), (static_cast<size_t>(h) << SLAB_BITS));
|
||||
|
||||
uint8_t n = meta[h].next;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user