libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
#include <gimbal_allocation_tracker.h>
Data Fields | |
size_t | maxAllocations |
size_t | maxBytes |
size_t | maxAllocationSize |
GblAllocationCounters | counters |
Related Symbols | |
(Note that these are not member symbols.) | |
Lifetime Management | |
Methods for creating and destroying | |
GBL_EXPORT GblAllocationTracker * | GblAllocationTracker_create (GblContext *pCtx) GBL_NOEXCEPT |
GBL_EXPORT GBL_RESULT | GblAllocationTracker_destroy (GBL_SELF) GBL_NOEXCEPT |
Allocation Events | |
Methods for capturing allocation events | |
GBL_EXPORT GBL_RESULT | GblAllocationTracker_allocEvent (GBL_SELF, const void *pPtr, size_t size, size_t align, const char *pDbg, GblSourceLocation srcLoc) GBL_NOEXCEPT |
GBL_EXPORT GBL_RESULT | GblAllocationTracker_reallocEvent (GBL_SELF, const void *pExisting, const void *pNew, size_t newSize, size_t newAlign, GblSourceLocation srcLoc) GBL_NOEXCEPT |
GBL_EXPORT GBL_RESULT | GblAllocationTracker_freeEvent (GBL_SELF, const void *pPtr, GblSourceLocation srcLoc) GBL_NOEXCEPT |
Utilities | |
General and other methods | |
GBL_EXPORT GblBool | GblAllocationTracker_validatePointer (GBL_CSELF, const void *pPtr) GBL_NOEXCEPT |
GBL_EXPORT GBL_RESULT | GblAllocationTracker_logActive (GBL_CSELF) GBL_NOEXCEPT |
Counter Operations | |
Methods involving GblAllocationCountes | |
GBL_EXPORT void | GblAllocationTracker_captureCounters (GBL_CSELF, GblAllocationCounters *pCount) GBL_NOEXCEPT |
GBL_EXPORT void | GblAllocationTracker_diffCounters (GBL_CSELF, const GblAllocationCounters *pSrc, GblAllocationCounters *pDst) GBL_NOEXCEPT |
Structure used for tracking allocation events and statistics.
Definition at line 31 of file gimbal_allocation_tracker.h.
|
related |
Creates a GblAllocationTracker and returns a pointer to it.
|
related |
Destroys the given GblAllocation tracker, returning the result.
|
related |
To be called every time an allocation has been requested, to track the event.
|
related |
To be called every time a reallocation has been requested, to track the event.
|
related |
To be called every time a free has been requested, to track the event.
|
related |
Returns GBL_TRUE if the given pointer points to an active, tracked allocation.
|
related |
Dumps all of the active allocations and their context information to the log.
|
related |
Saves the current value of GblAllocationTracker::counters to the given structure.
|
related |
Takes the difference between GblAllocationTracker::counters and pSrc, storing the result in the pDst.
size_t GblAllocationTracker::maxAllocations |
Maximum number of active allocations.
Definition at line 32 of file gimbal_allocation_tracker.h.
size_t GblAllocationTracker::maxBytes |
Maximum number of allocated bytes.
Definition at line 33 of file gimbal_allocation_tracker.h.
size_t GblAllocationTracker::maxAllocationSize |
Maximum size of a single allocation.
Definition at line 34 of file gimbal_allocation_tracker.h.
GblAllocationCounters GblAllocationTracker::counters |
Current allocation counters.
Definition at line 35 of file gimbal_allocation_tracker.h.