24 #include "cheetah/data/test_utils/CachingAllocatorTest.h" 25 #include "cheetah/data/CachingAllocator.h" 32 template <
typename CachingAllocatorTestTraitsType>
33 CachingAllocatorTest<CachingAllocatorTestTraitsType>::CachingAllocatorTest()
38 template <
typename CachingAllocatorTestTraitsType>
39 CachingAllocatorTest<CachingAllocatorTestTraitsType>::~CachingAllocatorTest()
44 template <
typename CachingAllocatorTestTraitsType>
45 void CachingAllocatorTest<CachingAllocatorTestTraitsType>::SetUp()
49 template <
typename CachingAllocatorTestTraitsType>
50 void CachingAllocatorTest<CachingAllocatorTestTraitsType>::TearDown()
54 template <
typename TypeParam>
55 void AllocateDeallocateTest<TypeParam>::test()
57 CachingAllocator<typename TypeParam::Architecture, typename TypeParam::ValueType> cache;
58 auto* a = cache.allocate(1000);
59 auto* b = cache.allocate(20);
60 cache.deallocate(a,1000);
61 auto* c = cache.allocate(4444);
62 cache.deallocate(b,20);
63 cache.deallocate(c,4444);
Some limits and constants for FLDO.