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

Function join_elem

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

* join two struct malloc_elem together. elem1 and elem2 must * be contiguous in memory. */

Source from the content-addressed store, hash-verified

492 * be contiguous in memory.
493 */
494static inline void
495join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2)
496{
497 struct malloc_elem *next = elem2->next;
498 elem1->size += elem2->size;
499 if (next)
500 next->prev = elem1;
501 else
502 elem1->heap->last = elem1;
503 elem1->next = next;
504 elem1->dirty |= elem2->dirty;
505 if (elem1->pad) {
506 struct malloc_elem *inner = RTE_PTR_ADD(elem1, elem1->pad);
507 inner->size = elem1->size - elem1->pad;
508 }
509}
510
511struct malloc_elem *
512malloc_elem_join_adjacent_free(struct malloc_elem *elem)

Callers 2

malloc_elem_resizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected