* Function to retrieve data for a given heap */
| 1141 | * Function to retrieve data for a given heap |
| 1142 | */ |
| 1143 | void |
| 1144 | malloc_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 | |
| 1162 | static int |
| 1163 | destroy_elem(struct malloc_elem *elem, size_t len) |
no test coverage detected