Ion
|
AllocationSizeTracker is an abstract base class for objects that track memory. More...
#include "allocationsizetracker.h"
Public Member Functions | |
virtual void | TrackAllocationSize (size_t allocation_size)=0 |
TrackAllocationSize() increments the currently tracked allocation size and the number of allocations. More... | |
virtual void | TrackDeallocationSize (size_t deallocation_size)=0 |
TrackDeallocationSize() decrements the current tracked allocation size and increments the number of deallocations. More... | |
virtual void | TrackAllocation (const Allocator &allocator, size_t requested_size, const void *memory)=0 |
TrackAllocation() is called immediately after an Allocator allocates memory. More... | |
virtual void | TrackDeallocation (const Allocator &allocator, const void *memory)=0 |
TrackDeallocation() is called immediately before an Allocator deallocates memory. More... | |
virtual size_t | GetAllocationCount ()=0 |
Returns the total number of tracked allocations or deallocations. More... | |
virtual size_t | GetDeallocationCount ()=0 |
virtual size_t | GetAllocatedBytesCount ()=0 |
Returns the total number of memory ever allocated or deallocated, in bytes. More... | |
virtual size_t | GetDeallocatedBytesCount ()=0 |
virtual size_t | GetActiveAllocationCount ()=0 |
Returns the number of active allocations or the amount of memory in bytes used by active allocations. More... | |
virtual size_t | GetActiveAllocationBytesCount ()=0 |
virtual void | SetGpuTracker (const AllocationSizeTrackerPtr &gpu_tracker)=0 |
Sets/returns an AllocationSizeTracker instance used to track GPU memory allocations. More... | |
virtual AllocationSizeTrackerPtr | GetGpuTracker ()=0 |
int | GetRefCount () const |
GetRefCount() is part of the interface necessary for SharedPtr. More... | |
AllocationSizeTracker is an abstract base class for objects that track memory.
Definition at line 30 of file allocationsizetracker.h.
|
pure virtualinherited |
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Returns the number of active allocations or the amount of memory in bytes used by active allocations.
These are not guaranteed to be supported by all derived classes; they may return 0 if not.
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Returns the total number of memory ever allocated or deallocated, in bytes.
These are not guaranteed to be supported by all derived classes; they may return 0 if not.
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Returns the total number of tracked allocations or deallocations.
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
Implemented in ion::base::FullAllocationTracker.
|
inlineinherited |
GetRefCount() is part of the interface necessary for SharedPtr.
Definition at line 34 of file shareable.h.
Referenced by ion::base::Notifier::RemoveReceiver().
|
pure virtualinherited |
Sets/returns an AllocationSizeTracker instance used to track GPU memory allocations.
Implemented in ion::base::FullAllocationTracker.
|
pure virtualinherited |
TrackAllocation() is called immediately after an Allocator allocates memory.
It receives a reference to the Allocator that allocated the memory, the requested size, and a pointer to the allocated memory.
Implemented in ion::base::FullAllocationTracker.
|
pure virtual |
TrackAllocationSize() increments the currently tracked allocation size and the number of allocations.
|
pure virtualinherited |
TrackDeallocation() is called immediately before an Allocator deallocates memory.
It receives a reference to the Allocator that is deallocating the memory and a pointer to the deallocated memory.
Implemented in ion::base::FullAllocationTracker.
|
pure virtual |
TrackDeallocationSize() decrements the current tracked allocation size and increments the number of deallocations.