summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-25 20:18:22 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-25 20:18:22 +0000
commit446a54178c4473a60d3ef5f41e143868a92f6111 (patch)
tree328c90ba23a79843d10cdd5840cdd8277d465283
parent405c4abb9f382c935b04c48f22b51b3f3970f71a (diff)
man/ruby.1: document stack size env variables
[Feature #10197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--man/ruby.128
2 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 86f9db71f3..521f254c7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 26 05:12:10 2014 Eric Wong <e@80x24.org>
+
+ * man/ruby.1: document stack size env variables
+ [Feature #10197]
+
Thu Sep 25 19:37:34 2014 Eric Wong <e@80x24.org>
* io.c (free_io_buffer): new function for a common pattern
diff --git a/man/ruby.1 b/man/ruby.1
index 1c0a7dabc7..8f0c0d1ae7 100644
--- a/man/ruby.1
+++ b/man/ruby.1
@@ -482,6 +482,34 @@ as below.
% gem help
.Ed
.Pp
+.Sh STACK SIZE ENVIRONMENT
+Stack size environment variables are implementation-dependent and
+subject to change with different versions of Ruby. The VM stack is used
+for pure-Ruby code and managed by the virtual machine. Machine stack is
+used by the operating system and its usage is dependent on C extensions
+as well as C compiler options. Using lower values for these may allow
+applications to keep more Fibers or Threads running; but increases the
+chance of SystemStackError exceptions and segmentation faults (SIGSEGV).
+These environment variables are available since Ruby 2.0.0.
+All values are specified in bytes.
+.Pp
+.Bl -hang -compact -width "RUBY_THREAD_MACHINE_STACK_SIZE"
+.It Ev RUBY_THREAD_VM_STACK_SIZE
+VM stack size used at thread creation.
+default: 131072 (32-bit CPU) or 262144 (64-bit)
+.Pp
+.It Ev RUBY_THREAD_MACHINE_STACK_SIZE
+Machine stack size used at thread creation.
+default: 524288 or 1048575
+.Pp
+.It Ev RUBY_FIBER_VM_STACK_SIZE
+VM stack size used at fiber creation.
+default: 65536 or 131072
+.Pp
+.It Ev RUBY_FIBER_MACHINE_STACK_SIZE
+Machine stack size used at fiber creation.
+default: 262144 or 524288
+.Pp
.Sh SEE ALSO
.Bl -hang -compact -width "http://www.ruby-lang.org/123"
.It https://www.ruby-lang.org/