Code review feedback.

This commit is contained in:
Matthew Parkinson
2019-02-05 16:57:09 +00:00
parent 83c55fe5da
commit f3897dd3e0
2 changed files with 7 additions and 0 deletions

View File

@@ -522,6 +522,9 @@ namespace snmalloc
size_t size = 0;
RemoteList list[REMOTE_SLOTS];
/// Used to find the index into the array of queues for remote
/// deallocation
/// r is used for which round of sending this is.
inline size_t get_slot(size_t id, size_t r)
{
constexpr size_t allocator_size =

View File

@@ -30,6 +30,10 @@ namespace snmalloc
}
};
static_assert(
sizeof(Remote) <= MIN_ALLOC_SIZE,
"Needs to be able to fit in smallest allocation.");
struct RemoteAllocator
{
using alloc_id_t = Remote::alloc_id_t;