reduce default SBO memory for strstr - relates to #575

Mon, 20 Jan 2025 22:43:46 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 20 Jan 2025 22:43:46 +0100
changeset 1136
d9ff0f091f28
parent 1135
f79415d974d3
child 1137
61939929030a

reduce default SBO memory for strstr - relates to #575

docs/src/install.md file | annotate | diff | comparison | revisions
src/string.c file | annotate | diff | comparison | revisions
--- 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:
--- 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;
 

mercurial