File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -526,6 +526,10 @@ namespace snmalloc
526526 entry.get_slab_metadata ()->as_key_tweak (),
527527 domesticate);
528528
529+ // Need to account for forwarded bytes.
530+ size_t size = nelem * sizeclass_full_to_size (entry.get_sizeclass ());
531+ bytes_returned += size;
532+
529533 need_post |= remote_dealloc_cache.reserve_space (entry, nelem);
530534
531535 remote_dealloc_cache.template forward <sizeof (Allocator)>(
@@ -1395,10 +1399,10 @@ namespace snmalloc
13951399 return capptr_domesticate<Config>(local_state, p);
13961400 };
13971401
1398- size_t bytes_flushed = 0 ;
1399-
14001402 if (destroy_queue)
14011403 {
1404+ size_t bytes_flushed = 0 ;
1405+
14021406 auto cb =
14031407 [this , domesticate, &bytes_flushed](capptr::Alloc<RemoteMessage> m) {
14041408 bool need_post = true ; // Always going to post, so ignore.
You can’t perform that action at this time.
0 commit comments