> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/plugins/api-plugin/plugin_api/plugin_api_services_for_plugins/instrumentation_interface/memory_instrumentation.md).

# Memory Instrumentation

The mysql\_memory\_register macro, which registers memory instruments with the Performance Schema.

> [`Plugin API`](https://mariadb.com/docs/server/reference/plugins/api-plugin/plugin_api.md) / [`Services for Plugins`](https://mariadb.com/docs/server/reference/plugins/api-plugin/plugin_api/plugin_api_services_for_plugins.md) / [`Instrumentation Interface`](https://mariadb.com/docs/server/reference/plugins/api-plugin/plugin_api/plugin_api_services_for_plugins/instrumentation_interface.md)

## Macros

| Name                                                    | Description          |
| ------------------------------------------------------- | -------------------- |
| [`MYSQL_MEMORY_H`](#mysql_memory_h)                     |                      |
| [`PSI_CALL_memory_alloc`](#psi_call_memory_alloc)       |                      |
| [`PSI_CALL_memory_free`](#psi_call_memory_free)         |                      |
| [`PSI_CALL_memory_realloc`](#psi_call_memory_realloc)   |                      |
| [`PSI_CALL_register_memory`](#psi_call_register_memory) |                      |
| [`PSI_MEMORY_CALL`](#psi_memory_call)                   |                      |
| [`mysql_memory_register`](#mysql_memory_register)       | Memory registration. |

***

### MYSQL\_MEMORY\_H

```cpp
#define MYSQL_MEMORY_H
```

Defined in psi/mysql\_memory.h:34

***

### PSI\_CALL\_memory\_alloc

```cpp
#define PSI_CALL_memory_alloc(A1, A2, A3, A1, A2, A3) 0
```

Defined in psi/mysql\_memory.h:44

***

### PSI\_CALL\_memory\_free

```cpp
#define PSI_CALL_memory_free(A1, A2, A3, A1, A2, A3) do { } while(0)
```

Defined in psi/mysql\_memory.h:45

***

### PSI\_CALL\_memory\_realloc

```cpp
#define PSI_CALL_memory_realloc(A1, A2, A3, A4, A1, A2, A3, A4) 0
```

Defined in psi/mysql\_memory.h:46

***

### PSI\_CALL\_register\_memory

```cpp
#define PSI_CALL_register_memory(A1, A2, A3, A1, A2, A3) do { } while(0)
```

Defined in psi/mysql\_memory.h:47

***

### PSI\_MEMORY\_CALL

```cpp
#define PSI_MEMORY_CALL(M, M) PSI_DYNAMIC_CALL(M)
```

Defined in psi/mysql\_memory.h:51

***

### mysql\_memory\_register

```cpp
#define mysql_memory_register(P1, P2, P3, P1, P2, P3) inline_mysql_memory_register(P1, P2, P3)
```

Defined in psi/mysql\_memory.h:58

Memory registration.

## Functions

| Return | Name                                                                              | Description |
| ------ | --------------------------------------------------------------------------------- | ----------- |
| `void` | [`inline_mysql_memory_register`](#inline_mysql_memory_register) `static` `inline` |             |

***

### inline\_mysql\_memory\_register

`static` `inline`

```cpp
static inline void inline_mysql_memory_register(const char *category __attribute__, void *info __attribute__, int count __attribute__, const char *category __attribute__, void *info __attribute__, int count __attribute__)
```

Defined in psi/mysql\_memory.h:61

<sub>*This page is licensed: GPLv2*</sub>

{% @marketo/form formId="4316" %}
