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

Function malloc_heap_dump

dpdk/lib/eal/common/malloc_heap.c:1143–1160  ·  view source on GitHub ↗

* Function to retrieve data for a given heap */

Source from the content-addressed store, hash-verified

1141 * Function to retrieve data for a given heap
1142 */
1143void
1144malloc_heap_dump(struct malloc_heap *heap, FILE *f)
1145{
1146 struct malloc_elem *elem;
1147
1148 rte_spinlock_lock(&heap->lock);
1149
1150 fprintf(f, "Heap size: 0x%zx\n", heap->total_size);
1151 fprintf(f, "Heap alloc count: %u\n", heap->alloc_count);
1152
1153 elem = heap->first;
1154 while (elem) {
1155 malloc_elem_dump(elem, f);
1156 elem = elem->next;
1157 }
1158
1159 rte_spinlock_unlock(&heap->lock);
1160}
1161
1162static int
1163destroy_elem(struct malloc_elem *elem, size_t len)

Callers 1

rte_malloc_dump_heapsFunction · 0.85

Calls 3

malloc_elem_dumpFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected