Remote: store the sizeclass, too

Squeeze some bits out of allocator IDs so that we can land the sizeclass in
each Remote object.  The intent is that, on StrictProvenance architectures like
CHERI, we will be able to route Remote messages through RemoteCache-s without
needing to amplify back to read the sizeclass metadata field out of the slab
headers.
This commit is contained in:
Nathaniel Filardo
2020-12-14 18:34:08 +00:00
committed by Matthew Parkinson
parent e9ed219fd8
commit 7c04a9dad6
4 changed files with 62 additions and 43 deletions

View File

@@ -11,6 +11,8 @@ namespace snmalloc
// using sizeclass_t = uint8_t;
using sizeclass_compress_t = uint8_t;
constexpr static uintptr_t SIZECLASS_MASK = 0xFF;
constexpr static uint16_t get_initial_offset(sizeclass_t sc, bool is_short);
constexpr static size_t sizeclass_to_size(sizeclass_t sizeclass);
constexpr static size_t