Let's avoid exporting structures without an identified usecase.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
#include <rte_log.h>
#include <rte_debug.h>
#include <rte_cycles.h>
-#include <rte_malloc_heap.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_launch.h>
* eal: removed the ``rte_malloc_virt2phy`` function, replaced by
``rte_malloc_virt2iova`` since v17.11.
+* mem: hid the internal ``malloc_heap`` structure and the
+ ``rte_malloc_heap.h`` header.
+
* The network structure ``esp_tail`` has been prefixed by ``rte_``.
* The network definitions of PPPoE ethertypes have been prefixed by ``RTE_``.
INC += rte_per_lcore.h rte_random.h
INC += rte_tailq.h rte_interrupts.h rte_alarm.h
INC += rte_string_fns.h rte_version.h
-INC += rte_eal_memconfig.h rte_malloc_heap.h
+INC += rte_eal_memconfig.h
INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_class.h
INC += rte_option.h
INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
#define EAL_MEMCFG_H
#include <rte_config.h>
-#include <rte_malloc_heap.h>
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_pause.h>
#include <rte_rwlock.h>
#include <rte_tailq.h>
+#include "malloc_heap.h"
+
/**
* Memory configuration shared across multiple processes.
*/
+++ /dev/null
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
- */
-
-#ifndef _RTE_MALLOC_HEAP_H_
-#define _RTE_MALLOC_HEAP_H_
-
-#include <stddef.h>
-#include <sys/queue.h>
-#include <rte_spinlock.h>
-#include <rte_memory.h>
-
-/* Number of free lists per heap, grouped by size. */
-#define RTE_HEAP_NUM_FREELISTS 13
-#define RTE_HEAP_NAME_MAX_LEN 32
-
-/* dummy definition, for pointers */
-struct malloc_elem;
-
-/**
- * Structure to hold malloc heap
- */
-struct malloc_heap {
- rte_spinlock_t lock;
- LIST_HEAD(, malloc_elem) free_head[RTE_HEAP_NUM_FREELISTS];
- struct malloc_elem *volatile first;
- struct malloc_elem *volatile last;
-
- unsigned alloc_count;
- unsigned int socket_id;
- size_t total_size;
- char name[RTE_HEAP_NAME_MAX_LEN];
-} __rte_cache_aligned;
-
-#endif /* _RTE_MALLOC_HEAP_H_ */
#define MALLOC_HEAP_H_
#include <stdbool.h>
+#include <sys/queue.h>
#include <rte_malloc.h>
-#include <rte_malloc_heap.h>
+#include <rte_spinlock.h>
+
+/* Number of free lists per heap, grouped by size. */
+#define RTE_HEAP_NUM_FREELISTS 13
+#define RTE_HEAP_NAME_MAX_LEN 32
+
+/* dummy definition, for pointers */
+struct malloc_elem;
+
+/**
+ * Structure to hold malloc heap
+ */
+struct malloc_heap {
+ rte_spinlock_t lock;
+ LIST_HEAD(, malloc_elem) free_head[RTE_HEAP_NUM_FREELISTS];
+ struct malloc_elem *volatile first;
+ struct malloc_elem *volatile last;
+
+ unsigned int alloc_count;
+ unsigned int socket_id;
+ size_t total_size;
+ char name[RTE_HEAP_NAME_MAX_LEN];
+} __rte_cache_aligned;
#ifdef __cplusplus
extern "C" {
'include/rte_lcore.h',
'include/rte_log.h',
'include/rte_malloc.h',
- 'include/rte_malloc_heap.h',
'include/rte_memory.h',
'include/rte_memzone.h',
'include/rte_option.h',