From 2f438d60106789a8628617ab41bc1c750ecae62b Mon Sep 17 00:00:00 2001 From: kosaki Date: Tue, 21 Oct 2014 18:48:03 +0000 Subject: [PATCH] * ext/etc/etc.c (etc_nprocessors_affin): maximum "n" should be 16384. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/etc/etc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5669112097..62c5239720 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 22 03:47:43 2014 KOSAKI Motohiro + + * ext/etc/etc.c (etc_nprocessors_affin): maximum "n" should be 16384. + Wed Oct 22 03:37:00 2014 KOSAKI Motohiro * ext/etc/etc.c (etc_nprocessors_affin): minor spell fix. diff --git a/ext/etc/etc.c b/ext/etc/etc.c index b25cb7b8e0..694ef5e17f 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -934,7 +934,7 @@ etc_nprocessors_affin(void) * So, we use hardcode number for a workaround. Current linux kernel * (Linux 3.17) support 8192 cpus at maximum. Then 16384 must be enough. */ - for (n=64; n < 16384; n *= 2) { + for (n=64; n <= 16384; n *= 2) { size = CPU_ALLOC_SIZE(n); if (size >= 1024) { cpuset = xcalloc(1, size);