#endif
uns dsize = SORT_DATA_SIZE(key);
uns recsize = ALIGN_TO(ksize_aligned + dsize, CPU_STRUCT_ALIGN);
- size_t totalsize = recsize + sizeof(P(internal_item_t) *) + P(internal_workspace)(&key);
+ size_t totalsize = recsize + 2 * P(internal_workspace)(&key);
if (unlikely(totalsize > remains
#ifdef CPU_64BIT_POINTERS
|| item >= item_array + ~0U // The number of items must fit in an uns
, workspace, bin->hash_bits
#endif
);
+ if ((void *)item_array != ctx->big_buf)
+ workspace = ctx->big_buf;
+ last_item = item_array + count;
ctx->total_int_time += get_timer(&timer);
SORT_XTRACE(5, "s-internal: Writing");