120 |
122 |
121 char sbo_mem[CX_ARRAY_SWAP_SBO_SIZE]; |
123 char sbo_mem[CX_ARRAY_SWAP_SBO_SIZE]; |
122 void *tmp; |
124 void *tmp; |
123 |
125 |
124 // decide if we can use the local buffer |
126 // decide if we can use the local buffer |
125 if (elem_size > CX_ARRAY_SWAP_SBO_SIZE) { |
127 if (elem_size > CX_ARRAY_SWAP_SBO_SIZE || CX_DISABLE_ARRAY_LIST_SWAP_SBO) { |
126 tmp = malloc(elem_size); |
128 tmp = malloc(elem_size); |
127 // we don't want to enforce error handling |
129 // we don't want to enforce error handling |
128 if (tmp == NULL) abort(); |
130 if (tmp == NULL) abort(); |
129 } else { |
131 } else { |
130 tmp = sbo_mem; |
132 tmp = sbo_mem; |