Skip to content

Commit

Permalink
shm: use (de)allocate_one() for ref counts
Browse files Browse the repository at this point in the history
  • Loading branch information
rbx committed Jan 25, 2024
1 parent 24d578a commit 1ee0977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fairmq/shmem/UnmanagedRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ struct UnmanagedRegion

RefCount& MakeRefCount(uint16_t initialCount = 1)
{
RefCount* refCount = fRefCountPool->allocate(1).get();
RefCount* refCount = fRefCountPool->allocate_one().get();
new (refCount) RefCount(initialCount);
return *refCount;
}

void RemoveRefCount(RefCount& refCount)
{
refCount.~RefCount();
fRefCountPool->deallocate(&refCount, 1);
fRefCountPool->deallocate_one(&refCount);
}

~UnmanagedRegion()
Expand Down

0 comments on commit 1ee0977

Please sign in to comment.