Globally defined and statically checked block size for pool allocator

This commit is contained in:
Pavel Kirienko
2014-02-04 20:16:50 +04:00
parent 832f0395bd
commit f91d8090c9
5 changed files with 47 additions and 11 deletions
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014 <pavel.kirienko@gmail.com>
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#include <gtest/gtest.h>
@@ -26,7 +26,7 @@ TEST(TransferIDRegistry, Basic)
typedef TransferIDRegistry::Entry Entry;
static const int POOL_BLOCKS = 8;
uavcan::PoolAllocator<32 * POOL_BLOCKS, 32> pool;
uavcan::PoolAllocator<uavcan::MEM_POOL_BLOCK_SIZE * POOL_BLOCKS, uavcan::MEM_POOL_BLOCK_SIZE> pool;
uavcan::PoolManager<2> poolmgr;
poolmgr.addPool(&pool);