SP: alloc paths: begin using CBAllocE
Begin turning the screws on bounds: pointers the allocator is about to reveal must be annotated as CBAllocE. Use the PAL's capptr_export and the AAL's capptr_bound<> to get them there.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
f2f1eb33d6
commit
54fec3821f
@@ -88,7 +88,7 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
template<ZeroMem zero_mem, SNMALLOC_CONCEPT(ConceptPAL) PAL>
|
||||
static CapPtr<void, CBArena>
|
||||
static CapPtr<void, CBAllocE>
|
||||
alloc(CapPtr<Mediumslab, CBArena> self, size_t size)
|
||||
{
|
||||
SNMALLOC_ASSERT(!full(self));
|
||||
@@ -102,7 +102,7 @@ namespace snmalloc
|
||||
else
|
||||
UNUSED(size);
|
||||
|
||||
return p;
|
||||
return capptr_export(Aal::capptr_bound<void, CBAlloc>(p, size));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
||||
Reference in New Issue
Block a user