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

Function close_hugefile

dpdk/lib/eal/linux/eal_memalloc.c:474–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474static void
475close_hugefile(int fd, char *path, int list_idx)
476{
477 const struct internal_config *internal_conf =
478 eal_get_internal_configuration();
479 /*
480 * primary process must unlink the file, but only when not in in-memory
481 * mode (as in that case there is no file to unlink).
482 */
483 if (!internal_conf->in_memory &&
484 rte_eal_process_type() == RTE_PROC_PRIMARY &&
485 unlink(path))
486 RTE_LOG(ERR, EAL, "%s(): unlinking '%s' failed: %s\n",
487 __func__, path, strerror(errno));
488
489 close(fd);
490 fd_list[list_idx].memseg_list_fd = -1;
491}
492
493static int
494resize_hugefile(int fd, uint64_t fa_offset, uint64_t page_sz, bool grow,

Callers 2

alloc_segFunction · 0.85
free_segFunction · 0.85

Calls 3

rte_eal_process_typeFunction · 0.85
closeFunction · 0.50

Tested by

no test coverage detected