| 494 | } |
| 495 | |
| 496 | static int |
| 497 | try_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 | |
| 517 | static int |
| 518 | compare_pagesz(const void *a, const void *b) |
no test coverage detected