Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/prim/unix/prim.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ size_t _mi_prim_numa_node(void) {

size_t _mi_prim_numa_node_count(void) {
char buf[128];
unsigned last_found = 1;
unsigned last_found = 0;
for(unsigned node = 1; node < 256; node++) {
// enumerate node entries -- todo: it there a more efficient way to do this? (but ensure there is no allocation)
_mi_snprintf(buf, 127, "/sys/devices/system/node/node%u", node);
Expand All @@ -618,7 +618,7 @@ size_t _mi_prim_numa_node_count(void) {
}
else { last_found = node; } // highest found node
}
return last_found;
return last_found + 1;
}

#elif defined(__FreeBSD__) && __FreeBSD_version >= 1200000
Expand Down