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

Function is_memory_overlap

dpdk/app/test/test_memzone.c:55–63  ·  view source on GitHub ↗

Test if memory overlaps: return 1 if true, or 0 if false. */

Source from the content-addressed store, hash-verified

53
54/* Test if memory overlaps: return 1 if true, or 0 if false. */
55static int
56is_memory_overlap(rte_iova_t ptr1, size_t len1, rte_iova_t ptr2, size_t len2)
57{
58 if (ptr2 >= ptr1 && (ptr2 - ptr1) < len1)
59 return 1;
60 else if (ptr2 < ptr1 && (ptr1 - ptr2) < len2)
61 return 1;
62 return 0;
63}
64
65static int
66test_memzone_invalid_alignment(void)

Callers 2

test_memzone_alignedFunction · 0.70
test_memzone_basicFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected