Commits

gyulalaszlo committed 41170e5

proxyallocator updates. TODO: find out why data member of ProxyAllocator throw PureVirtual errors on destruction|

Comments (0)

Files changed (2)

allocators/proxy_allocator.cc

 
     void ProxyAllocator::deallocate( void* p )
     {
-        deallocated += allocator.allocated_size( p );
+        if (p != nullptr)
+        {
+          deallocated += allocator.allocated_size( p );
+        }
         allocator.deallocate( p );
     }
 

allocators/proxy_allocator.h

     {
     public:
         ProxyAllocator( Allocator& parent, const char* name );
-        ~ProxyAllocator();
+        virtual ~ProxyAllocator();
 
         virtual void* allocate( uint32_t size, uint32_t align = DEFAULT_ALIGN );
         virtual void deallocate( void* p );