Allocator Builder
Policy Based C++ Template Allocator Library
|
enum alb::v_100::StatsOptions : unsigned |
The following options define what statistics shall be collected during runtime taken from https://github.com/andralex/phobos/blob/allocator/std/allocator.d and adapted to this implementation.
Enumerator | |
---|---|
NumOwns |
Counts the number of calls to alb::allocator_with_stats::owns. |
NumAllocate |
Counts the number of calls to alb::allocator_with_stats::allocate. All calls are counted, including requests for zero bytes or failed requests. |
NumAllocateOK |
Counts the number of calls to alb::allocator_with_stats::allocate that succeeded, i.e. they wherefor more than zero bytes and returned a non-null block. |
NumExpand |
Counts the number of calls to alb::allocator_with_stats::expand, regardless of arguments or result. |
NumExpandOK |
Counts the number of calls to alb::allocator_with_stats::expand that resulted in a successful expansion. |
NumReallocate |
Counts the number of calls to alb::allocator_with_stats::reallocate, regardless of arguments or result. |
NumReallocateOK |
Counts the number of calls to alb::allocator_with_stats::reallocate that succeeded. (Reallocations to zero bytes count as successful.) |
NumReallocateInPlace |
Counts the number of calls to alb::allocator_with_stats::reallocate that resulted in an in-place reallocation (no memory moved). If this number is close to the total number of reallocations, that indicates the allocator finds room at the current block's end in a large fraction of the cases, but also that internal fragmentation may be high (the size of the unit of allocation is large compared to the typical allocation size of the application). |
NumDeallocate |
Counts the number of calls to alb::allocator_with_stats::deallocate. |
NumDeallocateAll |
Counts the number of calls to alb::allocator_with_stats::deallocate_all. |
NumAll |
Chooses all numXxx)flags. |
BytesAllocated |
Tracks total cumulative bytes allocated by means of alb::allocator_with_stats::allocate, alb::allocator_with_stats::expand, and alb::allocator_with_stats::reallocate (when resulting in an expansion). This number always grows and indicates allocation traffic. To compute bytes currently allocated, subtract alb::allocator_with_stats::bytesDeallocated (below) from alb::allocator_with_stats::bytesAllocated. |
BytesDeallocated |
Tracks total cumulative bytes deallocated by means of alb::allocator_with_stats::deallocate and alb::allocator_with_stats::reallocate (when resulting in a contraction). This number always grows and indicates deallocation traffic. |
BytesExpanded |
Tracks the sum of all delta values in calls of the form alb::allocator_with_stats::expand(b, delta)) that succeed. |
BytesContracted |
Tracks the sum of all (b.length - s) with (b.length > s) in calls of the form alb::allocator_with_stats::reallocate(b, s)) that succeed. |
BytesMoved |
Tracks the sum of all bytes moved as a result of calls to alb::allocator_with_stats::reallocate that were unable to reallocate in place. A large number (relative to bytesAllocated)) indicates that the application should use larger preallocations. |
BytesSlack |
Measures the sum of extra bytes allocated beyond the bytes requested, i.e. the http://goo.gl/YoKffF, internal fragmentation). This is the current effective number of slack bytes, and it goes up and down with time. |
BytesHighTide |
Measures the maximum bytes allocated over the time. This is useful for dimensioning allocators. |
BytesAll |
Chooses all byteXxx flags. |
CallerSize |
Instructs AllocatorWithStats to store the size asked by the caller for each allocation. All per-allocation data is stored just before the actually allocation by using an affix_allocator. |
CallerFile |
Instructs AllocatorWithStats to store the caller's file for each allocation. |
CallerFunction |
Instructs AllocatorWithStats to store the caller function name for each allocation. |
CallerLine |
Instructs AllocatorWithStats to store the caller's line for each allocation. |
CallerTime |
Instructs AllocatorWithStats to store the time of each allocation. |
CallerAll |
Chooses all callerXxx flags. |
All |
Combines all flags above. |
Definition at line 44 of file allocator_with_stats.hpp.