src/cx/allocator.h

changeset 1318
12fa1d37fe48
parent 1188
b0300de92b72
child 1319
aa1f580f8f59
--- a/src/cx/allocator.h	Thu May 15 15:43:30 2025 +0200
+++ b/src/cx/allocator.h	Thu May 15 16:02:54 2025 +0200
@@ -98,10 +98,17 @@
 typedef struct cx_allocator_s CxAllocator;
 
 /**
- * A default allocator using standard library malloc() etc.
+ * A pre-defined allocator using standard library malloc() etc.
  */
 cx_attr_export
-extern const CxAllocator * const cxDefaultAllocator;
+extern const CxAllocator * const cxStdlibAllocator;
+
+/**
+ * The default allocator that is used by UCX.
+ * Initialized with cxStdlibAllocator, but you may change it.
+ */
+cx_attr_export
+extern const CxAllocator * cxDefaultAllocator;
 
 /**
  * Function pointer type for destructor functions.
@@ -135,6 +142,8 @@
  * Reallocate a previously allocated block and changes the pointer in-place,
  * if necessary.
  *
+ * @note This will use stdlib reallocate and @em not the cxDefaultAllocator.
+ *
  * @par Error handling
  * @c errno will be set by realloc() on failure.
  *
@@ -158,6 +167,8 @@
  *
  * The size is calculated by multiplying @p nemb and @p size.
  *
+ * @note This will use stdlib reallocate and @em not the cxDefaultAllocator.
+ *
  * @par Error handling
  * @c errno will be set by realloc() on failure or when the multiplication of
  * @p nmemb and @p size overflows.
@@ -182,6 +193,8 @@
  * Reallocate a previously allocated block and changes the pointer in-place,
  * if necessary.
  *
+ * @note This will use stdlib reallocate and @em not the cxDefaultAllocator.
+ *
  * @par Error handling
  * @c errno will be set by realloc() on failure.
  *
@@ -199,6 +212,8 @@
  *
  * The size is calculated by multiplying @p nemb and @p size.
  *
+ * @note This will use stdlib reallocate and @em not the cxDefaultAllocator.
+ *
  * @par Error handling
  * @c errno will be set by realloc() on failure or when the multiplication of
  * @p nmemb and @p size overflows.

mercurial