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

Function remove_elem

dpdk/lib/eal/common/malloc_elem.c:318–336  ·  view source on GitHub ↗

* our malloc heap is a doubly linked list, so doubly remove our element. */

Source from the content-addressed store, hash-verified

316 * our malloc heap is a doubly linked list, so doubly remove our element.
317 */
318static void __rte_unused
319remove_elem(struct malloc_elem *elem)
320{
321 struct malloc_elem *next, *prev;
322 next = elem->next;
323 prev = elem->prev;
324
325 if (next)
326 next->prev = prev;
327 else
328 elem->heap->last = prev;
329 if (prev)
330 prev->next = next;
331 else
332 elem->heap->first = next;
333
334 elem->prev = NULL;
335 elem->next = NULL;
336}
337
338static int
339next_elem_is_adjacent(struct malloc_elem *elem)

Callers 1

malloc_elem_hide_regionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected