MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_malloc_get_socket_stats

Function rte_malloc_get_socket_stats

dpdk/lib/eal/common/rte_malloc.c:235–248  ·  view source on GitHub ↗

* Function to retrieve data for heap on given socket */

Source from the content-addressed store, hash-verified

233 * Function to retrieve data for heap on given socket
234 */
235int
236rte_malloc_get_socket_stats(int socket,
237 struct rte_malloc_socket_stats *socket_stats)
238{
239 struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
240 int heap_idx;
241
242 heap_idx = malloc_socket_to_heap_id(socket);
243 if (heap_idx < 0)
244 return -1;
245
246 return malloc_heap_get_stats(&mcfg->malloc_heaps[heap_idx],
247 socket_stats);
248}
249
250/*
251 * Function to dump contents of all heaps

Callers 4

dump_socket_memFunction · 0.85
find_max_block_free_sizeFunction · 0.85
dump_socket_memFunction · 0.85

Calls 3

malloc_socket_to_heap_idFunction · 0.85
malloc_heap_get_statsFunction · 0.85

Tested by 2

find_max_block_free_sizeFunction · 0.68