NFC: additional generalization for CHERI
This commit is contained in:
committed by
Nathaniel Filardo
parent
d5b155bf25
commit
41128a3387
@@ -97,14 +97,13 @@ namespace snmalloc
|
||||
#ifdef SNMALLOC_TRACING
|
||||
message<1024>("Out of memory");
|
||||
#endif
|
||||
return {p, nullptr};
|
||||
return {nullptr, nullptr};
|
||||
}
|
||||
|
||||
typename Pagemap::Entry t(meta, ras);
|
||||
Pagemap::set_metaentry(address_cast(p), size, t);
|
||||
|
||||
p = Aal::capptr_bound<void, capptr::bounds::Chunk>(p, size);
|
||||
return {p, meta};
|
||||
return {Aal::capptr_bound<void, capptr::bounds::Chunk>(p, size), meta};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
namespace snmalloc
|
||||
{
|
||||
template<size_t MIN_BITS, typename F>
|
||||
void range_to_pow_2_blocks(capptr::Chunk<void> base, size_t length, F f)
|
||||
template<
|
||||
size_t MIN_BITS,
|
||||
SNMALLOC_CONCEPT(capptr::ConceptBound) B,
|
||||
typename F>
|
||||
void range_to_pow_2_blocks(CapPtr<void, B> base, size_t length, F f)
|
||||
{
|
||||
auto end = pointer_offset(base, length);
|
||||
base = pointer_align_up(base, bits::one_at_bit(MIN_BITS));
|
||||
|
||||
Reference in New Issue
Block a user