mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
shm: use (de)allocate_one() for ref counts
This commit is contained in:
parent
24d578a4ba
commit
1ee0977df4
|
@ -192,7 +192,7 @@ struct UnmanagedRegion
|
||||||
|
|
||||||
RefCount& MakeRefCount(uint16_t initialCount = 1)
|
RefCount& MakeRefCount(uint16_t initialCount = 1)
|
||||||
{
|
{
|
||||||
RefCount* refCount = fRefCountPool->allocate(1).get();
|
RefCount* refCount = fRefCountPool->allocate_one().get();
|
||||||
new (refCount) RefCount(initialCount);
|
new (refCount) RefCount(initialCount);
|
||||||
return *refCount;
|
return *refCount;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ struct UnmanagedRegion
|
||||||
void RemoveRefCount(RefCount& refCount)
|
void RemoveRefCount(RefCount& refCount)
|
||||||
{
|
{
|
||||||
refCount.~RefCount();
|
refCount.~RefCount();
|
||||||
fRefCountPool->deallocate(&refCount, 1);
|
fRefCountPool->deallocate_one(&refCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
~UnmanagedRegion()
|
~UnmanagedRegion()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user