summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-06-04 12:06:34 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-06-04 12:06:34 +0200
commit1e6f179dce6e87e7cca9d4b86b8d0450df9dbb2f (patch)
treed94af94f7e13a9d89a135913ab476fd9b8d371d3
parentaf8c6a9cedb5e431928647526e524d890e700b8e (diff)
run.cpp: Adjust for today's NUMA API
-rw-r--r--src/run.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/run.cpp b/src/run.cpp
index c3e2495..669b0f3 100644
--- a/src/run.cpp
+++ b/src/run.cpp
@@ -78,10 +78,11 @@ int Run::run() {
// memory will be allocated.
for (int i=0; i < this->exp->chains_per_thread; i++) {
int alloc_node_id = this->exp->chain_domain[this->thread_id()][i];
- nodemask_t alloc_mask;
- nodemask_zero(&alloc_mask);
- nodemask_set(&alloc_mask, alloc_node_id);
- numa_set_membind(&alloc_mask);
+ struct bitmask *bitmask = numa_allocate_nodemask();
+ numa_bitmask_clearall(bitmask);
+ numa_bitmask_setbit(bitmask, alloc_node_id);
+ numa_set_membind(bitmask);
+ numa_free_nodemask(bitmask);
chain_memory[i] = new Chain[ this->exp->links_per_chain ];
}