[RFC 0/4] malloc type argument cleanup (part 1)
Stephen Hemminger
stephen at networkplumber.org
Thu Apr 25 20:23:57 CEST 2024
This part documents and provides script to replace the unused
type argument in rte_malloc. The type was intended to be a string
but never implemented, and if it hasn't been implemented in 10 years
it won't be. Too invasive to completely remove it.
Stephen Hemminger (4):
rte_malloc: document that type is unused
devtools/cocci: add script to find unnecessary malloc type
devtools/cocci: add script to find where rte_calloc should be used
eal/malloc: remove type argument from internal malloc routines
devtools/cocci/malloc-type.cocci | 27 +++++++++++++++++++
devtools/cocci/prefer-calloc.cocci | 19 ++++++++++++++
lib/eal/common/eal_common_memzone.c | 6 ++---
lib/eal/common/malloc_heap.c | 39 ++++++++++++----------------
lib/eal/common/malloc_heap.h | 7 +++--
lib/eal/common/rte_malloc.c | 16 +++++-------
lib/eal/include/eal_trace_internal.h | 4 +--
lib/eal/include/rte_malloc.h | 21 +++++----------
8 files changed, 82 insertions(+), 57 deletions(-)
create mode 100644 devtools/cocci/malloc-type.cocci
create mode 100644 devtools/cocci/prefer-calloc.cocci
--
2.43.0
More information about the dev
mailing list