2 |
2 |
3 With the `CxAllocator` interface UCX provides the possibility to use custom allocator functions for different purposes. |
3 With the `CxAllocator` interface UCX provides the possibility to use custom allocator functions for different purposes. |
4 Many UCX functions support the use of specialized allocators or provide a second function suffixed with `_a`. |
4 Many UCX functions support the use of specialized allocators or provide a second function suffixed with `_a`. |
5 |
5 |
6 For convenience, functions that are not explicitly requesting an allocator - like e.g. `cx_strdup_a()` - also accept |
6 For convenience, functions that are not explicitly requesting an allocator - like e.g. `cx_strdup_a()` - also accept |
7 `NULL` as an allocator, in which case the `cxDefaultAllocator` and stdlib functions are used. |
7 `NULL` as an allocator, in which case the [default allocator](allocator.h.md#default-allocator) is used. |
8 |
8 |
9 Additionally, UCX also provides a [memory pool](mempool.h.md) implementation of the allocator interface. |
9 Additionally, UCX also provides a [memory pool](mempool.h.md) implementation of the allocator interface. |
10 |
10 |
11 > Although not part of the public API, UCX is also implementing the allocator interface |
11 > Although not part of the public API, UCX is also implementing the allocator interface |
12 > in its own test suite: `CxTestingAllocator`. This allocator keeps track of memory allocations |
12 > in its own test suite: `CxTestingAllocator`. This allocator keeps track of memory allocations |