![]() |
MySQL 8.0.43
Source Code Documentation
|
Miscellaneous global dependencies (implementation). More...
#include "storage/perfschema/pfs_global.h"#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "my_sys.h"#include "sql/log.h"#include "storage/perfschema/pfs_builtin_memory.h"#include <unistd.h>#include <arpa/inet.h>#include <netinet/in.h>Functions | |
| void * | pfs_malloc (PFS_builtin_memory_class *klass, size_t size, myf flags) |
| Memory allocation for the performance schema. More... | |
| void | pfs_free (PFS_builtin_memory_class *klass, size_t size, void *ptr) |
| Free memory allocated with. More... | |
| void * | pfs_malloc_array (PFS_builtin_memory_class *klass, size_t n, size_t size, myf flags) |
| Array allocation for the performance schema. More... | |
| void | pfs_free_array (PFS_builtin_memory_class *klass, size_t n, size_t size, void *ptr) |
| Free array allocated by. More... | |
| bool | is_overflow (size_t product, size_t n1, size_t n2) |
| Detect multiplication overflow. More... | |
| void | pfs_print_error (const char *format,...) |
| uint | pfs_get_socket_address (char *host, uint host_len, uint *port, const struct sockaddr_storage *src_addr, socklen_t) |
| Convert raw ip address into readable format. More... | |
Variables | |
| bool | pfs_initialized = false |
| True when the performance schema is initialized. More... | |
Miscellaneous global dependencies (implementation).
| bool is_overflow | ( | size_t | product, |
| size_t | n1, | ||
| size_t | n2 | ||
| ) |
Detect multiplication overflow.
| product | multiplication product |
| n1 | operand |
| n2 | operand |
| void pfs_free | ( | PFS_builtin_memory_class * | klass, |
| size_t | size, | ||
| void * | ptr | ||
| ) |
Free memory allocated with.
| void pfs_free_array | ( | PFS_builtin_memory_class * | klass, |
| size_t | n, | ||
| size_t | size, | ||
| void * | ptr | ||
| ) |
Free array allocated by.
Free memory allocated with.
| klass | performance schema memory class |
| n | number of array elements |
| size | element size |
| ptr | pointer to memory |
| uint pfs_get_socket_address | ( | char * | host, |
| uint | host_len, | ||
| uint * | port, | ||
| const struct sockaddr_storage * | src_addr, | ||
| socklen_t | src_len | ||
| ) |
Convert raw ip address into readable format.
Do not do a reverse DNS lookup.
| void * pfs_malloc | ( | PFS_builtin_memory_class * | klass, |
| size_t | size, | ||
| myf | flags | ||
| ) |
Memory allocation for the performance schema.
The memory used internally in the performance schema implementation. It is allocated at startup, or during runtime with scalable buffers.
| void * pfs_malloc_array | ( | PFS_builtin_memory_class * | klass, |
| size_t | n, | ||
| size_t | size, | ||
| myf | flags | ||
| ) |
Array allocation for the performance schema.
Allocate an array of structures with overflow check.
Checks for overflow of n * size before allocating.
| klass | performance schema memory class |
| n | number of array elements |
| size | element size |
| flags | malloc flags |
| void pfs_print_error | ( | const char * | format, |
| ... | |||
| ) |
| bool pfs_initialized = false |
True when the performance schema is initialized.