提交 fafb2a25 编写于 作者: D dholmes

8165153: Crash in rebuild_cpu_to_node_map

Summary: use processor_count(), not active_processor_count() to determine physical number of CPUs
Reviewed-by: rehn, cjplummer
上级 739f8991
...@@ -2854,7 +2854,7 @@ void os::Linux::rebuild_cpu_to_node_map() { ...@@ -2854,7 +2854,7 @@ void os::Linux::rebuild_cpu_to_node_map() {
// in the library. // in the library.
const size_t BitsPerCLong = sizeof(long) * CHAR_BIT; const size_t BitsPerCLong = sizeof(long) * CHAR_BIT;
size_t cpu_num = os::active_processor_count(); size_t cpu_num = processor_count();
size_t cpu_map_size = NCPUS / BitsPerCLong; size_t cpu_map_size = NCPUS / BitsPerCLong;
size_t cpu_map_valid_size = size_t cpu_map_valid_size =
MIN2((cpu_num + BitsPerCLong - 1) / BitsPerCLong, cpu_map_size); MIN2((cpu_num + BitsPerCLong - 1) / BitsPerCLong, cpu_map_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册