Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/os_linux.cpp @ 267:9d6a3a6891f8
6720130: NUMA allocator: The linux version should search for libnuma.so.1
Summary: Search for libnuma.so.1 on Linux and liblgrp.so.1 on Solaris.
Reviewed-by: jmasa
author | iveresov |
---|---|
date | Mon, 14 Jul 2008 04:12:47 -0700 |
parents | f139919897d2 |
children | 850fdf70db2b |
comparison
equal
deleted
inserted
replaced
266:2214b226b7f0 | 267:9d6a3a6891f8 |
---|---|
2276 // sched_getcpu() should be in libc. | 2276 // sched_getcpu() should be in libc. |
2277 set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, | 2277 set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, |
2278 dlsym(RTLD_DEFAULT, "sched_getcpu"))); | 2278 dlsym(RTLD_DEFAULT, "sched_getcpu"))); |
2279 | 2279 |
2280 if (sched_getcpu() != -1) { // Does it work? | 2280 if (sched_getcpu() != -1) { // Does it work? |
2281 void *handle = dlopen("libnuma.so", RTLD_LAZY); | 2281 void *handle = dlopen("libnuma.so.1", RTLD_LAZY); |
2282 if (handle != NULL) { | 2282 if (handle != NULL) { |
2283 set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t, | 2283 set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t, |
2284 dlsym(handle, "numa_node_to_cpus"))); | 2284 dlsym(handle, "numa_node_to_cpus"))); |
2285 set_numa_max_node(CAST_TO_FN_PTR(numa_max_node_func_t, | 2285 set_numa_max_node(CAST_TO_FN_PTR(numa_max_node_func_t, |
2286 dlsym(handle, "numa_max_node"))); | 2286 dlsym(handle, "numa_max_node"))); |