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:
Nathaniel Filardo
2021-03-11 00:50:14 +00:00
committed by Nathaniel Wesley Filardo
parent f2f1eb33d6
commit 54fec3821f
3 changed files with 57 additions and 39 deletions

View File

@@ -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