|
Flow-IPC 3.0.0
Flow-IPC project: Full implementation reference.
|
Go to the source code of this file.
Macros | |
| #define | IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT(ARG_1, ARG_2) IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT_IMPL(ARG_1, ARG_2) |
| Helper macro to enable IPC_SHM_ARENA_LEND_JEMALLOC_API() impl to work. More... | |
| #define | IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT_IMPL(ARG_1, ARG_2) ARG_1 ## ARG_2 |
| Helper macro to enable IPC_SHM_ARENA_LEND_JEMALLOC_API() impl to work. More... | |
| #define | IPC_SHM_ARENA_LEND_JEMALLOC_API(ARG_api_name) IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT(IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX, ARG_api_name) |
To be used when invoking jemalloc public API functions, this evaluates to the given argument (which shall be a function name) pre-pended with the value of macro IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX. More... | |
| #define IPC_SHM_ARENA_LEND_JEMALLOC_API | ( | ARG_api_name | ) | IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT(IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX, ARG_api_name) |
To be used when invoking jemalloc public API functions, this evaluates to the given argument (which shall be a function name) pre-pended with the value of macro IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX.
For example IPC_SHM_ARENA_LEND_JEMALLOC_API(mallocx) might resolve to simply mallocx or je_mallocx depending on the value of IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX.
It can be head-breaking to understand why one needs those 2 levels of macros; in fact for me (ygoldfel) the comprehension arrives and leaves at will; but I assure you using only 1 intermediate macro that simply ##es the args together is not enough (let alone none).
| ARG_api_name | A jemalloc API sans prefix (e.g., malloc, mallocx). |
IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX value when building the library and unit tests – that is by Flow-IPC's internal build scripts – via compiler command-line macro-defines. If headers begin using jemalloc APIs – in templates, constexprs, and/or perhaps inlined functions – then we would need to dynamically generate and export a header containing IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX definition (e.g., using a .hpp.in file turned into .hpp file by the build script). We would then #include that dynamically-generated header above this macro's definition in its containing header file (detail/jemalloc.hpp as of this writing). Definition at line 87 of file jemalloc.hpp.
| #define IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT | ( | ARG_1, | |
| ARG_2 | |||
| ) | IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT_IMPL(ARG_1, ARG_2) |
Helper macro to enable IPC_SHM_ARENA_LEND_JEMALLOC_API() impl to work.
Users of this header may ignore.
| ARG_1 | First thing. |
| ARG_2 | Second thing. |
Definition at line 48 of file jemalloc.hpp.
| #define IPC_SHM_ARENA_LEND_JEMALLOC_API_PREFIX_CONCAT_IMPL | ( | ARG_1, | |
| ARG_2 | |||
| ) | ARG_1 ## ARG_2 |
Helper macro to enable IPC_SHM_ARENA_LEND_JEMALLOC_API() impl to work.
Users of this header may ignore.
| ARG_1 | First thing. |
| ARG_2 | Second thing. |
Definition at line 59 of file jemalloc.hpp.