mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:33:34 +08:00
Allocator interface: getNumBlocks() --> getBlockCapacity()
This commit is contained in:
@@ -295,10 +295,10 @@ CanIOManager::CanIOManager(ICanDriver& driver, IPoolAllocator& allocator, ISyste
|
||||
|
||||
if (mem_blocks_per_iface == 0)
|
||||
{
|
||||
mem_blocks_per_iface = allocator.getNumBlocks() / (num_ifaces_ + 1U) + 1U;
|
||||
mem_blocks_per_iface = allocator.getBlockCapacity() / (num_ifaces_ + 1U) + 1U;
|
||||
}
|
||||
UAVCAN_TRACE("CanIOManager", "Memory blocks per iface: %u, total: %u",
|
||||
unsigned(mem_blocks_per_iface), unsigned(allocator.getNumBlocks()));
|
||||
unsigned(mem_blocks_per_iface), unsigned(allocator.getBlockCapacity()));
|
||||
|
||||
for (int i = 0; i < num_ifaces_; i++)
|
||||
{
|
||||
|
||||
@@ -33,9 +33,9 @@ void LimitedPoolAllocator::deallocate(const void* ptr)
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t LimitedPoolAllocator::getNumBlocks() const
|
||||
uint16_t LimitedPoolAllocator::getBlockCapacity() const
|
||||
{
|
||||
return min(max_blocks_, allocator_.getNumBlocks());
|
||||
return min(max_blocks_, allocator_.getBlockCapacity());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user