diff -r 0711d869ce4d -r 5136f2fc32ec src/array_list.c --- a/src/array_list.c Fri Jan 12 20:24:29 2024 +0100 +++ b/src/array_list.c Sat Jan 13 17:51:42 2024 +0100 @@ -107,6 +107,8 @@ #define CX_ARRAY_SWAP_SBO_SIZE 128 #endif +bool CX_DISABLE_ARRAY_LIST_SWAP_SBO = false; + void cx_array_swap( void *arr, size_t elem_size, @@ -122,7 +124,7 @@ void *tmp; // decide if we can use the local buffer - if (elem_size > CX_ARRAY_SWAP_SBO_SIZE) { + if (elem_size > CX_ARRAY_SWAP_SBO_SIZE || CX_DISABLE_ARRAY_LIST_SWAP_SBO) { tmp = malloc(elem_size); // we don't want to enforce error handling if (tmp == NULL) abort();