X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_malloc_heap.h;h=b27035628f1e74b9a486b40e9a660a12f527288a;hb=6a34f91690d0;hp=fc4fd0acad51f4633c6dfec16f565d900c8952b8;hpb=3031749c2df04a63cdcef186dcce3781e61436e8;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_malloc_heap.h b/lib/librte_eal/common/include/rte_malloc_heap.h index fc4fd0acad..b27035628f 100644 --- a/lib/librte_eal/common/include/rte_malloc_heap.h +++ b/lib/librte_eal/common/include/rte_malloc_heap.h @@ -35,15 +35,19 @@ #define _RTE_MALLOC_HEAP_H_ #include +#include #include +#include + +/* Number of free lists per heap, grouped by size. */ +#define RTE_HEAP_NUM_FREELISTS 13 /** * Structure to hold malloc heap */ struct malloc_heap { rte_spinlock_t lock; - struct malloc_elem * volatile free_head; - unsigned mz_count; + LIST_HEAD(, malloc_elem) free_head[RTE_HEAP_NUM_FREELISTS]; unsigned alloc_count; size_t total_size; } __rte_cache_aligned;