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

Function try_expand_heap

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

Source from the content-addressed store, hash-verified

494}
495
496static int
497try_expand_heap(struct malloc_heap *heap, uint64_t pg_sz, size_t elt_size,
498 int socket, unsigned int flags, size_t align, size_t bound,
499 bool contig)
500{
501 int ret;
502
503 rte_mcfg_mem_write_lock();
504
505 if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
506 ret = try_expand_heap_primary(heap, pg_sz, elt_size, socket,
507 flags, align, bound, contig);
508 } else {
509 ret = try_expand_heap_secondary(heap, pg_sz, elt_size, socket,
510 flags, align, bound, contig);
511 }
512
513 rte_mcfg_mem_write_unlock();
514 return ret;
515}
516
517static int
518compare_pagesz(const void *a, const void *b)

Callers 1

alloc_more_mem_on_socketFunction · 0.85

Calls 5

rte_mcfg_mem_write_lockFunction · 0.85
rte_eal_process_typeFunction · 0.85
try_expand_heap_primaryFunction · 0.85

Tested by

no test coverage detected