9dbe628a7b
If allocation is successful on the first attempt, typically
there is no problem since we allocated everything required and
we'll terminate the loop (if memory chunk is really sufficient
to populate required number of mempool elements).
If the first attempt fails, we try to allocate half
of mem_size and it succeed, we'll have one more iteration of
the for-loop to allocate memory for remaining elements and
should not try the next time with quarter of the mem_size.
It is wrong that max_alloc_size is divided by 2 in the
case of successful allocation as well, or invalid memory
can be allocated, and leads to population failure, then errno
other than ENOMEM may be returned.
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
mempool_trace_points.c | ||
meson.build | ||
rte_mempool_ops_default.c | ||
rte_mempool_ops.c | ||
rte_mempool_trace_fp.h | ||
rte_mempool_trace.h | ||
rte_mempool_version.map | ||
rte_mempool.c | ||
rte_mempool.h |