MySQL 8.0.40
Source Code Documentation
|
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "memory_debugging.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_psi_config.h"
#include "my_sys.h"
#include "my_thread_local.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/psi/mysql_memory.h"
#include "mysql/psi/psi_memory.h"
#include "mysys_err.h"
Macros | |
#define | USE_MALLOC_WRAPPER |
Typedefs | |
typedef void *(* | allocator_func) (size_t, myf) |
typedef void *(* | realloc_func) (void *, size_t) |
typedef void(* | deallocator_func) (void *) |
Functions | |
static void * | std_allocator (size_t size, myf my_flags) |
static void | std_deallocator (void *ptr) |
static void * | redirecting_allocator (size_t size, myf my_flags) |
static void | redirecting_deallocator (void *ptr) |
template<allocator_func allocator> | |
void * | my_raw_malloc (size_t size, myf my_flags) |
Allocate a sized block of memory. More... | |
template<deallocator_func deallocator> | |
void | my_raw_free (void *ptr) |
Free memory allocated with my_raw_malloc. More... | |
template<allocator_func allocator> | |
void * | my_internal_malloc (PSI_memory_key key, size_t size, myf flags) |
void * | my_malloc (PSI_memory_key key, size_t size, myf flags) |
Allocates size bytes of memory. More... | |
void * | my_std_malloc (PSI_memory_key key, size_t size, myf flags) |
template<deallocator_func deallocator> | |
void | my_internal_free (void *ptr) |
template<allocator_func allocator, deallocator_func deallocator> | |
void * | my_internal_realloc (PSI_memory_key key, void *ptr, size_t size, myf flags) |
void * | my_realloc (PSI_memory_key key, void *ptr, size_t size, myf flags) |
void * | my_std_realloc (PSI_memory_key key, void *ptr, size_t size, myf flags) |
void | my_claim (const void *ptr, bool claim) |
void | my_free (void *ptr) |
Frees the memory pointed by the ptr. More... | |
void | my_std_free (void *ptr) |
void * | my_memdup (PSI_memory_key key, const void *from, size_t length, myf my_flags) |
char * | my_strdup (PSI_memory_key key, const char *from, myf my_flags) |
char * | my_strndup (PSI_memory_key key, const char *from, size_t length, myf my_flags) |
#define USE_MALLOC_WRAPPER |
typedef void *(* allocator_func) (size_t, myf) |
typedef void(* deallocator_func) (void *) |
typedef void *(* realloc_func) (void *, size_t) |
void my_claim | ( | const void * | ptr, |
bool | claim | ||
) |
void my_free | ( | void * | ptr | ) |
Frees the memory pointed by the ptr.
ptr | memory address to be freed |
void my_internal_free | ( | void * | ptr | ) |
void * my_internal_malloc | ( | PSI_memory_key | key, |
size_t | size, | ||
myf | flags | ||
) |
void * my_internal_realloc | ( | PSI_memory_key | key, |
void * | ptr, | ||
size_t | size, | ||
myf | flags | ||
) |
void * my_malloc | ( | PSI_memory_key | key, |
size_t | size, | ||
int | flags | ||
) |
Allocates size bytes of memory.
key | P_S key used for memory instrumentation |
size | size bytes to allocate the memory |
flags | used at the time of allocation. Could be MY_ZEROFILL |
void * my_memdup | ( | PSI_memory_key | key, |
const void * | from, | ||
size_t | length, | ||
myf | my_flags | ||
) |
void my_raw_free | ( | void * | ptr | ) |
Free memory allocated with my_raw_malloc.
ptr | Pointer to the memory allocated by my_raw_malloc. |
void * my_raw_malloc | ( | size_t | size, |
myf | my_flags | ||
) |
Allocate a sized block of memory.
size | The size of the memory block in bytes. |
my_flags | Failure action modifiers (bitmasks). |
void * my_realloc | ( | PSI_memory_key | key, |
void * | ptr, | ||
size_t | size, | ||
myf | flags | ||
) |
void my_std_free | ( | void * | ptr | ) |
void * my_std_malloc | ( | PSI_memory_key | key, |
size_t | size, | ||
myf | flags | ||
) |
void * my_std_realloc | ( | PSI_memory_key | key, |
void * | ptr, | ||
size_t | size, | ||
myf | flags | ||
) |
char * my_strdup | ( | PSI_memory_key | key, |
const char * | from, | ||
myf | my_flags | ||
) |
char * my_strndup | ( | PSI_memory_key | key, |
const char * | from, | ||
size_t | length, | ||
myf | my_flags | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |