MySQL 5.6.14 Source Code Document
|
#include "my_global.h"
#include "my_compiler.h"
Go to the source code of this file.
Macros | |
#define | PFS_ALIGNED |
#define | PFS_MALLOC_ARRAY(n, T, f) reinterpret_cast<T*> (pfs_malloc((n) * sizeof(T), (f))) |
#define | SANITIZE_ARRAY_BODY(T, ARRAY, MAX, UNSAFE) |
Functions | |
void * | pfs_malloc (size_t size, myf flags) |
void | pfs_free (void *ptr) |
uint | pfs_get_socket_address (char *host, uint host_len, uint *port, const struct sockaddr_storage *src_addr, socklen_t src_len) |
uint | randomized_index (const void *ptr, uint max_size) |
void | pfs_print_error (const char *format,...) |
Variables | |
bool | pfs_initialized |
size_t | pfs_allocated_memory |
Miscellaneous global dependencies (declarations).
Definition in file pfs_global.h.
#define PFS_MALLOC_ARRAY | ( | n, | |
T, | |||
f | |||
) | reinterpret_cast<T*> (pfs_malloc((n) * sizeof(T), (f))) |
Helper, to allocate an array of structures.
n | number of elements in the array. |
T | type of an element. |
f | flags to use when allocating memory |
Definition at line 52 of file pfs_global.h.
#define SANITIZE_ARRAY_BODY | ( | T, | |
ARRAY, | |||
MAX, | |||
UNSAFE | |||
) |
Given an array defined as T ARRAY[MAX], check that an UNSAFE pointer actually points to an element within the array.
Definition at line 126 of file pfs_global.h.
void pfs_free | ( | void * | ptr | ) |
Free memory allocated with
Definition at line 89 of file pfs_global.cc.
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.
Definition at line 130 of file pfs_global.cc.
void* pfs_malloc | ( | size_t | size, |
myf | flags | ||
) |
Memory allocation for the performance schema. The memory used internally in the performance schema implementation is allocated once during startup, and considered static thereafter.
Definition at line 47 of file pfs_global.cc.
|
inline |
Compute a random index value in an interval.
ptr | seed address |
max_size | maximun size of the interval |
Definition at line 71 of file pfs_global.h.
size_t pfs_allocated_memory |
Total memory allocated by the performance schema, in bytes.
Definition at line 40 of file pfs_global.cc.
bool pfs_initialized |
True when the performance schema is initialized.
Definition at line 39 of file pfs_global.cc.