shm: use (de)allocate_one() for ref counts

This commit is contained in:
Alexey Rybalchenko 2024-01-24 11:31:08 +01:00
parent 24d578a4ba
commit 1ee0977df4

View File

@ -192,7 +192,7 @@ 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;
}
@ -200,7 +200,7 @@ struct UnmanagedRegion
void RemoveRefCount(RefCount& refCount)
{
refCount.~RefCount();
fRefCountPool->deallocate(&refCount, 1);
fRefCountPool->deallocate_one(&refCount);
}
~UnmanagedRegion()