--- a/ucx/cx/allocator.h Fri Dec 12 12:00:34 2025 +0100 +++ b/ucx/cx/allocator.h Fri Dec 12 12:28:32 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"