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