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:
Nathaniel Filardo
2021-03-05 12:57:34 +00:00
committed by Nathaniel Wesley Filardo
parent 97f508e2b3
commit c5aff8ed74
4 changed files with 45 additions and 40 deletions

View File

@@ -141,6 +141,15 @@ namespace snmalloc
return p.template as_static<FreeObject>();
}
/**
* Construct a FreeObject for local slabs from a Remote message.
*/
static CapPtr<FreeObject, CBArena> make(CapPtr<Remote, CBArena> p)
{
// TODO: Zero the difference between a FreeObject and a Remote
return p.template as_reinterpret<FreeObject>();
}
/**
* Read the next pointer handling any required decoding of the pointer
*/