![]() |
MySQL 8.0.43
Source Code Documentation
|
NUMA API wrapper over various operating system specific APIs. More...
Go to the source code of this file.
Functions | |
| int | os_numa_available () |
| Check if NUMA is available. More... | |
| int | os_numa_num_configured_cpus () |
| Get the number of CPUs in the system, including disabled ones. More... | |
| int | os_numa_node_of_cpu (int cpu) |
| Get the NUMA node of a given CPU. More... | |
| void * | os_numa_alloc_onnode (size_t size, int node) |
| Allocate a memory on a given NUMA node. More... | |
| void | os_numa_free (void *ptr, size_t size) |
| Free a memory allocated by os_numa_alloc_onnode(). More... | |
NUMA API wrapper over various operating system specific APIs.
The os_numa*() functions in this file mimic the numa*() Linux API that is documented in numa(3). They take the same arguments, have the same return type and behave in the same way. There are two purposes behind this:
Created Jul 16, 2015 Vasil Dimov
|
inline |
Allocate a memory on a given NUMA node.
| [in] | size | number of bytes to allocate |
| [in] | node | NUMA node on which to allocate the memory |
|
inline |
Check if NUMA is available.
This function must be called before any other os_numa_*() functions and it must return != -1, otherwise the behavior of the rest of the functions is undefined.
|
inline |
Free a memory allocated by os_numa_alloc_onnode().
| [in] | ptr | pointer to memory to free |
| [in] | size | size of the memory |
|
inline |
Get the NUMA node of a given CPU.
| [in] | cpu | CPU whose NUMA node to return, must be obtained using os_getcpu(). |
|
inline |
Get the number of CPUs in the system, including disabled ones.