[#144] Another implementation of Bignum — "Dmitry Antipov" <dmitry.antipov@...>

Hello Ruby hackers,

15 messages 2002/06/06

Hardcoded magic numbers

From: "Dmitry Antipov" <dmitry.antipov@...>
Date: 2002-06-07 09:59:46 UTC
List: ruby-core #153
Hello all again,

IMHO this is not clean to have magic limits inside the interpreter.
For example, we have 10 * 1024 * 1024 (maximum chunk size
to allocate) and 50 * 1024 * 1024 (maximum new size for reallocated
chunk), both in gc.c. It may be useful to set these limits from command
line or even from Ruby program like this:

GC.allocmax(50 * 1024 * 1024)
GC.reallocmax(128 * 1024 * 1024)

Also we can check (on UNIX at least) per-user limits (ulimit)
and set these values accordingly. Any ideas ?

Dmitry

In This Thread

Prev Next