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

Function destroy_elem

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

Source from the content-addressed store, hash-verified

1160}
1161
1162static int
1163destroy_elem(struct malloc_elem *elem, size_t len)
1164{
1165 struct malloc_heap *heap = elem->heap;
1166
1167 /* notify all subscribers that a memory area is going to be removed */
1168 eal_memalloc_mem_event_notify(RTE_MEM_EVENT_FREE, elem, len);
1169
1170 /* this element can be removed */
1171 malloc_elem_free_list_remove(elem);
1172 malloc_elem_hide_region(elem, elem, len);
1173
1174 heap->total_size -= len;
1175
1176 memset(elem, 0, sizeof(*elem));
1177
1178 return 0;
1179}
1180
1181struct rte_memseg_list *
1182malloc_heap_create_external_seg(void *va_addr, rte_iova_t iova_addrs[],

Callers 1

Calls 4

malloc_elem_hide_regionFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected