MySQL 8.4.0
Source Code Documentation
mysql_memory.h File Reference

Instrumentation helpers for memory allocation. More...

#include "my_compiler.h"
#include "my_inttypes.h"
#include "template_utils.h"
#include "my_psi_config.h"
#include "mysql/psi/psi_memory.h"
#include "pfs_memory_provider.h"

Go to the source code of this file.

Classes

struct  my_memory_header
 

Macros

#define PSI_MEMORY_CALL(M)   psi_memory_service->M
 
#define mysql_memory_register(P1, P2, P3)    inline_mysql_memory_register(P1, P2, P3)
 Memory registration. More...
 
#define PSI_HEADER_SIZE   32
 
#define PSI_MEMORY_MAGIC   1234
 
#define PSI_MEM_CNT_BIT   ((uint)1 << 31)
 
#define PSI_REAL_MEM_KEY(P)   ((PSI_memory_key)((P) & ~PSI_MEM_CNT_BIT))
 
#define USER_TO_HEADER(P)   ((my_memory_header *)(((char *)P) - PSI_HEADER_SIZE))
 
#define HEADER_TO_USER(P)   (((char *)P) + PSI_HEADER_SIZE)
 
#define USER_TO_HEADER_UINT8_T(P)    (((static_cast<uint8_t *>(P)) - PSI_HEADER_SIZE))
 

Typedefs

typedef struct my_memory_header my_memory_header
 

Functions

static void inline_mysql_memory_register (const char *category, PSI_memory_info *info, int count)
 

Detailed Description

Instrumentation helpers for memory allocation.

Macro Definition Documentation

◆ PSI_MEMORY_CALL

#define PSI_MEMORY_CALL (   M)    psi_memory_service->M