@@ -135,8 +135,9 @@ template <typename DerivedAllocator> class BaseAllocator {
135135 derivedAlloc = nullptr ;
136136 }
137137
138- virtual std::unique_ptr<MemoryBlock, MemoryBlock::deallocator_fn>
138+ virtual ~BaseAllocator () = default ;
139139
140+ virtual std::unique_ptr<MemoryBlock, MemoryBlock::deallocator_fn>
140141 allocateBlock (size_t size) = 0;
141142
142143 template <typename T> MemoryAccessor<T> allocate (size_t num) {
@@ -217,8 +218,8 @@ class LinearAllocator : public BaseAllocator<LinearAllocator> {
217218
218219 std::string getName () const ;
219220
220- virtual std::unique_ptr<MemoryBlock, MemoryBlock::deallocator_fn>
221- allocateBlock (size_t size);
221+ std::unique_ptr<MemoryBlock, MemoryBlock::deallocator_fn>
222+ allocateBlock (size_t size) override ;
222223
223224private:
224225 static constexpr size_t alignBytes = sizeof (uintptr_t );
@@ -247,7 +248,7 @@ class HostRam {
247248 std::string getName () const { return " HostRamAlloc" ; }
248249
249250 std::unique_ptr<MemoryBlock, MemoryBlock::deallocator_fn>
250- allocateBlock (size_t size);
251+ allocateBlock (size_t size) override ;
251252 };
252253
253254 static HostRamAllocator &getAllocator () {
@@ -264,7 +265,7 @@ class HostDmaRam {
264265 public:
265266 HostDmaRamAllocator (int num);
266267
267- virtual ~HostDmaRamAllocator ();
268+ ~HostDmaRamAllocator () override ;
268269
269270 std::string getName () const { return getUdmaBufName (num); }
270271
0 commit comments