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

Function addr_to_socket

dpdk/app/test/test_malloc.c:957–963  ·  view source on GitHub ↗

* Find what socket a memory address is on. Only works for addresses within * memsegs, not heap or stack... */

Source from the content-addressed store, hash-verified

955 * memsegs, not heap or stack...
956 */
957static int32_t
958addr_to_socket(void * addr)
959{
960 const struct rte_memseg *ms = rte_mem_virt2memseg(addr, NULL);
961 return ms == NULL ? -1 : ms->socket_id;
962
963}
964
965/* Test using rte_[c|m|zm]alloc_socket() on a specific socket */
966static int

Callers 2

test_realloc_numaFunction · 0.85
test_alloc_single_socketFunction · 0.85

Calls 1

rte_mem_virt2memsegFunction · 0.85

Tested by

no test coverage detected