MySQL 8.3.0
Source Code Documentation

Memory statistics. More...

#include <pfs_stat.h>

Public Member Functions

void reset ()
 
void rebase ()
 
PFS_memory_stat_alloc_deltacount_alloc (size_t size, PFS_memory_stat_alloc_delta *delta)
 
PFS_memory_stat_free_deltacount_free (size_t size, PFS_memory_stat_free_delta *delta)
 

Public Attributes

bool m_used
 
size_t m_alloc_count
 
size_t m_free_count
 
size_t m_alloc_size
 
size_t m_free_size
 
size_t m_alloc_count_capacity
 
size_t m_free_count_capacity
 
size_t m_alloc_size_capacity
 
size_t m_free_size_capacity
 

Detailed Description

Memory statistics.

Conceptually, the following statistics are maintained:

  • CURRENT_COUNT_USED,
  • LOW_COUNT_USED,
  • HIGH_COUNT_USED
  • CURRENT_SIZE_USED,
  • LOW_SIZE_USED,
  • HIGH_SIZE_USED Now, the implementation keeps different counters, which are easier (less overhead) to maintain while collecting statistics. Invariants are as follows: CURRENT_COUNT_USED = m_alloc_count - m_free_count LOW_COUNT_USED + m_free_count_capacity = CURRENT_COUNT_USED CURRENT_COUNT_USED + m_alloc_count_capacity = HIGH_COUNT_USED CURRENT_SIZE_USED = m_alloc_size - m_free_size LOW_SIZE_USED + m_free_size_capacity = CURRENT_SIZE_USED CURRENT_SIZE_USED + m_alloc_size_capacity = HIGH_SIZE_USED

Member Data Documentation

◆ m_alloc_count

size_t PFS_memory_safe_stat::m_alloc_count

◆ m_alloc_count_capacity

size_t PFS_memory_safe_stat::m_alloc_count_capacity

◆ m_alloc_size

size_t PFS_memory_safe_stat::m_alloc_size

◆ m_alloc_size_capacity

size_t PFS_memory_safe_stat::m_alloc_size_capacity

◆ m_free_count

size_t PFS_memory_safe_stat::m_free_count

◆ m_free_count_capacity

size_t PFS_memory_safe_stat::m_free_count_capacity

◆ m_free_size

size_t PFS_memory_safe_stat::m_free_size

◆ m_free_size_capacity

size_t PFS_memory_safe_stat::m_free_size_capacity

◆ m_used

bool PFS_memory_safe_stat::m_used

The documentation for this struct was generated from the following files: