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

Function resize_hugefile

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

Source from the content-addressed store, hash-verified

491}
492
493static int
494resize_hugefile(int fd, uint64_t fa_offset, uint64_t page_sz, bool grow,
495 bool *dirty)
496{
497 /* in-memory mode is a special case, because we can be sure that
498 * fallocate() is supported.
499 */
500 const struct internal_config *internal_conf =
501 eal_get_internal_configuration();
502
503 if (internal_conf->in_memory) {
504 if (dirty != NULL)
505 *dirty = false;
506 return resize_hugefile_in_memory(fd, fa_offset,
507 page_sz, grow);
508 }
509
510 return resize_hugefile_in_filesystem(fd, fa_offset, page_sz,
511 grow, dirty);
512}
513
514static int
515alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,

Callers 2

alloc_segFunction · 0.85
free_segFunction · 0.85

Tested by

no test coverage detected