Remote dealloc refactor. (#138)

Improve remote dealloc

- Outline the slow path to improve code gen significantly

- Handle message queue only on slow path for remote dealloc.

- Change remote size to count down 0, so fast path does not need a constant.

- Use signed value so that branch does not depend on addition.
This commit is contained in:
Matthew Parkinson
2020-03-10 08:12:57 +00:00
committed by GitHub
parent 31da639f49
commit 76eaf1adad
3 changed files with 26 additions and 16 deletions

View File

@@ -135,7 +135,7 @@ namespace snmalloc
// Post all remotes, including forwarded ones. If any allocator posts,
// repeat the loop.
if (alloc->remote.size > 0)
if (alloc->remote.capacity < REMOTE_CACHE)
{
alloc->stats().remote_post();
alloc->remote.post(alloc->id());