# HG changeset patch # User Mike Becker # Date 1688745592 -7200 # Node ID b3b113eac3b8ad31ae2872e839210db7ecec7f0e # Parent 70885c3d15b086948f44e737f98da0d740de677e add overridable macros to the install docs diff -r 70885c3d15b0 -r b3b113eac3b8 docs/src/install.md --- a/docs/src/install.md Fri Jul 07 17:51:54 2023 +0200 +++ b/docs/src/install.md Fri Jul 07 17:59:52 2023 +0200 @@ -18,6 +18,35 @@ cmake --build . sudo cmake --install . +When compiling UCX 3, you can tweak the buffer sizes for small-buffer-optimization. +You can do this, be pre-defining one or more of the following macros: + +--------------------------------- --------------------------------------------------------------------- ---------- +Macro Description Default +--------------------------------- --------------------------------------------------------------------- ---------- +CX_ARRAY_SWAP_SBO_SIZE The maximum item size in an array list that uses SBO. 128 + +CX_LINKED_LIST_SORT_SBO_SIZE The maximum list size that uses SBO during sort. 1024 + +CX_LINKED_LIST_SWAP_SBO_SIZE The maximum item size that uses SBO swap instead of relinking. 128 + +CX_PRINTF_SBO_SIZE The maximum string length printf.h uses stack memory for. 512 + +CX_STRSTR_SBO_SIZE The maximum length of the "needle" in strstr that can use SBO. 512 +--------------------------------- --------------------------------------------------------------------- ---------- + +You can also tweak some other buffer sizes with the same technique: + +--------------------------------- --------------------------------------------------- ---------- +Macro Description Default +--------------------------------- --------------------------------------------------- ---------- +CX_STRREPLACE_INDEX_BUFFER_SIZE The number of matches one index buffer can store. 64 + +CX_STREAM_COPY_BUF_SIZE The buffer size on the stack for a stream copy. 1024 + +CX_STREAM_BCOPY_BUF_SIZE The buffer size on the heap for a stream copy. 8192 +--------------------------------- --------------------------------------------------- ---------- + --- ### UCX 2.1