Skip to content

Commit 1e5c0e1

Browse files
committed
avoid copy of the numa_nodes vec
1 parent 7d0f8c4 commit 1e5c0e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/provider_os_memory_multiple_numa_nodes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,15 @@ TEST_P(testNumaSplit, checkModeSplit) {
558558
ASSERT_EQ(out.size(), pages)
559559
<< "Wrong test input - out array size doesn't match page count";
560560

561-
auto v = numa_nodes;
562561
// If input partitions are not defined then partitions are created based on numa_list order.
563562
// Do not shuffle them in this case, as this test require deterministic binds
564563
if (in.size() != 0) {
565564
std::mt19937 g(0);
566-
std::shuffle(v.begin(), v.begin() + required_numa_nodes, g);
565+
std::shuffle(numa_nodes.begin(),
566+
numa_nodes.begin() + required_numa_nodes, g);
567567
}
568568

569-
os_memory_provider_params.numa_list = v.data();
569+
os_memory_provider_params.numa_list = numa_nodes.data();
570570
os_memory_provider_params.numa_list_len = required_numa_nodes;
571571
os_memory_provider_params.numa_mode = UMF_NUMA_MODE_SPLIT;
572572

0 commit comments

Comments
 (0)