![]() |
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Snapshot of the memory allocator's statistics. More...
#include <stk_memory_allocator.h>
Public Member Functions | |
| Stats (size_t _capacity=CAPACITY_DEFAULT) | |
| size_t | GetCapacity () const |
| Get total capacity of the memory pool. | |
| size_t | GetAvailable () const |
| Get number of bytes currently available for allocation. | |
| void | RecordAllocate (size_t size) |
| Record sucessful allocation. | |
| void | RecordFree (size_t size) |
| Record sucessful deallocation. | |
Public Attributes | |
| const size_t | capacity |
| Total capacity of the memory pool in bytes. | |
| volatile size_t | allocated |
| Number of bytes currently allocated (dynamic value). | |
| volatile size_t | allocate_count |
| Number of succesful allocations with Allocate(). | |
| volatile size_t | free_count |
| Number of succesful frees with Free(). | |
| volatile size_t | min_ever_free |
| Minimum free bytes recorded since system start (watermark). | |
Snapshot of the memory allocator's statistics.
Definition at line 65 of file stk_memory_allocator.h.
|
inline |
Definition at line 67 of file stk_memory_allocator.h.
References allocate_count, allocated, capacity, stk::memory::MemoryAllocator::CAPACITY_DEFAULT, free_count, and min_ever_free.
|
inline |
Get number of bytes currently available for allocation.
Definition at line 86 of file stk_memory_allocator.h.
References allocated, and capacity.
Referenced by RecordAllocate(), and vPortGetHeapStats().
|
inline |
Get total capacity of the memory pool.
Definition at line 81 of file stk_memory_allocator.h.
References capacity.
|
inline |
Record sucessful allocation.
| [in] | size | Size of allocated memory chunk. |
Definition at line 91 of file stk_memory_allocator.h.
References allocate_count, allocated, GetAvailable(), stk::Min(), and min_ever_free.
|
inline |
Record sucessful deallocation.
| [in] | size | Size of freed memory chunk. |
Definition at line 101 of file stk_memory_allocator.h.
References allocated, free_count, and STK_ASSERT.
| volatile size_t stk::memory::MemoryAllocator::Stats::allocate_count |
Number of succesful allocations with Allocate().
Definition at line 74 of file stk_memory_allocator.h.
Referenced by RecordAllocate(), Stats(), and vPortGetHeapStats().
| volatile size_t stk::memory::MemoryAllocator::Stats::allocated |
Number of bytes currently allocated (dynamic value).
Definition at line 73 of file stk_memory_allocator.h.
Referenced by GetAvailable(), RecordAllocate(), RecordFree(), and Stats().
| const size_t stk::memory::MemoryAllocator::Stats::capacity |
Total capacity of the memory pool in bytes.
Definition at line 72 of file stk_memory_allocator.h.
Referenced by GetAvailable(), GetCapacity(), and Stats().
| volatile size_t stk::memory::MemoryAllocator::Stats::free_count |
Number of succesful frees with Free().
Definition at line 75 of file stk_memory_allocator.h.
Referenced by RecordFree(), Stats(), and vPortGetHeapStats().
| volatile size_t stk::memory::MemoryAllocator::Stats::min_ever_free |
Minimum free bytes recorded since system start (watermark).
Definition at line 76 of file stk_memory_allocator.h.
Referenced by RecordAllocate(), Stats(), and vPortGetHeapStats().