|
Grok 20.3.2
|
#include <MemManager.h>
Classes | |
| struct | Stats |
Public Member Functions | |
| void * | malloc (size_t size) |
| void * | calloc (size_t num, size_t size) |
| void * | aligned_malloc (size_t bytes) |
| void * | aligned_malloc (size_t alignment, size_t bytes) |
| void * | realloc (void *ptr, size_t new_size) |
| void | free (void *ptr) |
| void | aligned_free (void *ptr) |
| Stats | get_stats () const |
| void | print_stats () const |
Static Public Member Functions | |
| static MemoryManager & | get () |
| static void | releaseFreedPages () |
Private Member Functions | |
| MemoryManager () | |
| ~MemoryManager () | |
| MemoryManager (const MemoryManager &)=delete | |
| MemoryManager & | operator= (const MemoryManager &)=delete |
Private Attributes | |
| bool | track_stats = false |
| bool | track_details = false |
| std::mutex | stats_mutex |
| std::atomic< size_t > | allocations {0} |
| std::atomic< size_t > | deallocations {0} |
| std::atomic< size_t > | reallocations {0} |
| std::atomic< size_t > | total_allocated {0} |
| size_t | current_allocated = 0 |
| size_t | peak_allocated = 0 |
| std::unordered_map< void *, size_t > | allocation_map |
|
inlineprivate |
References track_details, and track_stats.
Referenced by get(), MemoryManager(), and operator=().
|
inlineprivate |
References print_stats(), and track_stats.
|
privatedelete |
References MemoryManager().
|
inline |
References allocation_map, current_allocated, deallocations, stats_mutex, track_details, and track_stats.
Referenced by grk::grk_aligned_free().
|
inline |
References allocation_map, allocations, current_allocated, peak_allocated, stats_mutex, total_allocated, track_details, and track_stats.
|
inline |
References aligned_malloc(), and grk::grk_buffer_alignment.
Referenced by aligned_malloc(), grk::grk_aligned_malloc(), and grk::grk_aligned_malloc().
|
inline |
References allocation_map, allocations, current_allocated, peak_allocated, stats_mutex, total_allocated, track_details, and track_stats.
Referenced by grk::grk_calloc().
|
inline |
References allocation_map, current_allocated, deallocations, stats_mutex, track_details, and track_stats.
Referenced by grk::grk_free().
|
inlinestatic |
References MemoryManager().
Referenced by grk::grk_aligned_free(), grk::grk_aligned_malloc(), grk::grk_aligned_malloc(), grk::grk_calloc(), grk::grk_free(), grk::grk_malloc(), grk::grk_print_memory_stats(), and grk::grk_realloc().
|
inline |
References allocations, current_allocated, deallocations, peak_allocated, reallocations, stats_mutex, and total_allocated.
Referenced by print_stats().
|
inline |
References allocation_map, allocations, current_allocated, peak_allocated, stats_mutex, total_allocated, track_details, and track_stats.
Referenced by grk::grk_malloc().
|
privatedelete |
References MemoryManager().
|
inline |
References get_stats(), and track_stats.
Referenced by grk::grk_print_memory_stats(), and ~MemoryManager().
|
inline |
References allocation_map, allocations, current_allocated, peak_allocated, reallocations, stats_mutex, total_allocated, track_details, and track_stats.
Referenced by grk::grk_realloc().
|
inlinestatic |
Referenced by grk::TileCompletion::wait().
|
private |
Referenced by aligned_free(), aligned_malloc(), calloc(), free(), malloc(), and realloc().
|
private |
Referenced by aligned_malloc(), calloc(), get_stats(), malloc(), and realloc().
|
private |
Referenced by aligned_free(), aligned_malloc(), calloc(), free(), get_stats(), malloc(), and realloc().
|
private |
Referenced by aligned_free(), free(), and get_stats().
|
private |
Referenced by aligned_malloc(), calloc(), get_stats(), malloc(), and realloc().
|
private |
Referenced by get_stats(), and realloc().
|
mutableprivate |
Referenced by aligned_free(), aligned_malloc(), calloc(), free(), get_stats(), malloc(), and realloc().
|
private |
Referenced by aligned_malloc(), calloc(), get_stats(), malloc(), and realloc().
|
private |
Referenced by aligned_free(), aligned_malloc(), calloc(), free(), malloc(), MemoryManager(), and realloc().
|
private |
Referenced by aligned_free(), aligned_malloc(), calloc(), free(), malloc(), MemoryManager(), print_stats(), realloc(), and ~MemoryManager().