# HG changeset patch # User Mike Becker # Date 1737409426 -3600 # Node ID d9ff0f091f2875fd5e520be6c2107d6ec7be76ad # Parent f79415d974d3c3b89f9f4b09ade0b2dfc2666843 reduce default SBO memory for strstr - relates to #575 diff -r f79415d974d3 -r d9ff0f091f28 docs/src/install.md --- a/docs/src/install.md Sun Jan 19 17:17:01 2025 +0100 +++ b/docs/src/install.md Mon Jan 20 22:43:46 2025 +0100 @@ -30,7 +30,7 @@ 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 cx_strstr that can use SBO. 512 +CX_STRSTR_SBO_SIZE The maximum length of the "needle" in cx_strstr that can use SBO. 128 --------------------------------- --------------------------------------------------------------------- ---------- You can also tweak some other buffer sizes with the same technique: diff -r f79415d974d3 -r d9ff0f091f28 src/string.c --- a/src/string.c Sun Jan 19 17:17:01 2025 +0100 +++ b/src/string.c Mon Jan 20 22:43:46 2025 +0100 @@ -263,7 +263,7 @@ } #ifndef CX_STRSTR_SBO_SIZE -#define CX_STRSTR_SBO_SIZE 512 +#define CX_STRSTR_SBO_SIZE 128 #endif const unsigned cx_strstr_sbo_size = CX_STRSTR_SBO_SIZE;