Class MemoryResourceCounts

Inheritance Relationships

Base Type

Class Documentation

class MemoryResourceCounts : public c4::MemoryResource

a MemoryResource which latches onto another MemoryResource and counts allocations and sizes.

Public Functions

inline MemoryResourceCounts()
inline MemoryResourceCounts(MemoryResource *res)
inline MemoryResource *resource()
inline AllocationCounts const &counts() const

Protected Functions

inline virtual void *do_allocate(size_t sz, size_t alignment, void*) override
inline virtual void do_deallocate(void *ptr, size_t sz, size_t alignment) override
inline virtual void *do_reallocate(void *ptr, size_t oldsz, size_t newsz, size_t alignment) override

Protected Attributes

MemoryResource *m_resource
AllocationCounts m_counts