An array of the size of total operations needed for the de/compression is
reserved for ops while enqueueing, although only first burst_size entries
of the array are used.
Reduce the size of the array allocated.
Fixes: b68a82425da4 ("app/compress-perf: add performance measurement")
Cc: stable@dpdk.org
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
/* one array for both enqueue and dequeue */
ops = rte_zmalloc_socket(NULL,
- 2 * mem->total_bufs * sizeof(struct rte_comp_op *),
+ (test_data->burst_sz + mem->total_bufs) *
+ sizeof(struct rte_comp_op *),
0, rte_socket_id());
if (ops == NULL) {
return -1;
}
- deq_ops = &ops[mem->total_bufs];
+ deq_ops = &ops[test_data->burst_sz];
if (type == RTE_COMP_COMPRESS) {
xform = (struct rte_comp_xform) {