#include <metrics.h>
Public Member Functions | |
::pw::StatusWithSize | get_requested_bytes () const |
::pw::StatusWithSize | get_peak_requested_bytes () const |
::pw::StatusWithSize | get_cumulative_requested_bytes () const |
::pw::StatusWithSize | get_allocated_bytes () const |
::pw::StatusWithSize | get_peak_allocated_bytes () const |
::pw::StatusWithSize | get_cumulative_allocated_bytes () const |
::pw::StatusWithSize | get_num_allocations () const |
::pw::StatusWithSize | get_num_deallocations () const |
::pw::StatusWithSize | get_num_resizes () const |
::pw::StatusWithSize | get_num_reallocations () const |
::pw::StatusWithSize | get_num_free_blocks () const |
::pw::StatusWithSize | get_smallest_free_block_size () const |
::pw::StatusWithSize | get_largest_free_block_size () const |
::pw::StatusWithSize | get_num_failures () const |
::pw::StatusWithSize | get_unfulfilled_bytes () const |
void | UpdateDeferred (Allocator &) |
A predefined metric struct that enables no allocator metrics.
This struct declares all valid metrics, but enables none of them. Other metrics struct MUST derive from this type, and should use PW_ALLOCATOR_METRICS_INCLUDE
and/or PW_ALLOCATOR_METRICS_ENABLE
.
|
inline |
Updates metrics by querying an allocator directly.
Metrics are typically updated by an allocator when the pw::Allocator API is invoked. In some cases, there may be metrics that cannot be determined at the interface or are too expensive to do so, e.g. determining the smallest free block. This method provides a way for metrics structs to request these values on-demand.
For this empty base struct, this is simply a no-op.