Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for libnuma >=2.0.14 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/utils/CpuNumaUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ static std::vector<std::vector<int>> get_cpu_numa_map(int &num_cpus, int &num_no
printf("%d physical cores total.\n", nphycpus_);
int node_count = numa_max_node() + 1;
for (int i = 0; i < node_count; ++i) {
long fr;
unsigned long sz = numa_node_size(i, &fr);
long long fr;
unsigned long long sz = numa_node_size64(i, &fr);
if (print_stats)
printf("Node %d: %13lu Available %13ld Free\n", i, sz, fr);
printf("Node %d: %13llu Available %13lld Free\n", i, sz, fr);
}
print_stats = true;
std::vector<std::vector<int>> cpu_map;
Expand All @@ -96,11 +96,11 @@ static int get_numa_node_from_ptr(void *ptr) {
std::cout << "WARNING: get_mempolicy failed" << std::endl;
return numa_node;
};
static long numa_node_free_mem(int node) {
long _free = 0;
numa_node_size(node, &_free);
static long long numa_node_free_mem(int node) {
long long _free = 0;
numa_node_size64(node, &_free);
return _free;
};

};
}
}