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

Function mem_set_dump

dpdk/lib/vhost/vhost_user.c:765–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763}
764
765void
766mem_set_dump(void *ptr, size_t size, bool enable, uint64_t pagesz)
767{
768#ifdef MADV_DONTDUMP
769 void *start = RTE_PTR_ALIGN_FLOOR(ptr, pagesz);
770 uintptr_t end = RTE_ALIGN_CEIL((uintptr_t)ptr + size, pagesz);
771 size_t len = end - (uintptr_t)start;
772
773 if (madvise(start, len, enable ? MADV_DODUMP : MADV_DONTDUMP) == -1) {
774 rte_log(RTE_LOG_INFO, vhost_config_log_level,
775 "VHOST_CONFIG: could not set coredump preference (%s).\n", strerror(errno));
776 }
777#endif
778}
779
780static void
781translate_ring_addresses(struct virtio_net **pdev, struct vhost_virtqueue **pvq)

Callers 7

translate_ring_addressesFunction · 0.85
vhost_user_mmap_regionFunction · 0.85
inflight_mem_allocFunction · 0.85
vhost_user_set_log_baseFunction · 0.85

Calls 1

rte_logFunction · 0.85

Tested by

no test coverage detected