ucx/cx/allocator.h

changeset 30
d33eaaec15da
parent 22
112b85020dc9
--- a/ucx/cx/allocator.h	Thu Dec 11 22:58:02 2025 +0100
+++ b/ucx/cx/allocator.h	Fri Dec 12 10:42:53 2025 +0100
@@ -146,6 +146,17 @@
                              const CxAllocator *allocator, void *data);
 
 /**
+ * Returns the system's memory page size.
+ *
+ * If the page size cannot be retrieved from the system,
+ * a default of 4096 bytes is assumed.
+ *
+ * @return the system's memory page size in bytes
+ */
+cx_attr_nodiscard
+CX_EXPORT unsigned long cx_system_page_size(void);
+
+/**
  * Reallocate a previously allocated block and changes the pointer in-place,
  * if necessary.
  *
@@ -428,9 +439,9 @@
  */
 #define cxReallocArrayDefault(...) cxReallocArray(cxDefaultAllocator, __VA_ARGS__)
 /**
- * Convenience macro that invokes cxFree() with the cxDefaultAllocator.
+ * Convenience function that invokes cxFree() with the cxDefaultAllocator.
  */
-#define cxFreeDefault(...) cxFree(cxDefaultAllocator, __VA_ARGS__)
+CX_EXPORT void cxFreeDefault(void *mem);
 
 #ifdef __cplusplus
 } // extern "C"

mercurial