Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
allocationsizetracker.h
Go to the documentation of this file.
1 
18 #ifndef ION_BASE_ALLOCATIONSIZETRACKER_H_
19 #define ION_BASE_ALLOCATIONSIZETRACKER_H_
20 
22 #include "ion/base/shareable.h"
23 #include "ion/base/sharedptr.h"
24 
25 namespace ion {
26 namespace base {
27 
31  public:
34  virtual void TrackAllocationSize(size_t allocation_size) = 0;
35 
38  virtual void TrackDeallocationSize(size_t deallocation_size) = 0;
39 };
40 
43 
44 } // namespace base
45 } // namespace ion
46 
47 #endif // ION_BASE_ALLOCATIONSIZETRACKER_H_
AllocationTracker is an abstract base class for objects that track memory.
SharedPtr< AllocationSizeTracker > AllocationSizeTrackerPtr
Convenience typedef for shared pointer to a AllocationSizeTracker.
virtual void TrackDeallocationSize(size_t deallocation_size)=0
TrackDeallocationSize() decrements the current tracked allocation size and increments the number of d...
AllocationSizeTracker is an abstract base class for objects that track memory.
virtual void TrackAllocationSize(size_t allocation_size)=0
TrackAllocationSize() increments the currently tracked allocation size and the number of allocations...
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
Definition: sharedptr.h:60