Memory Allocation in low RAM environments

Reading up on garbage collection and memory allocation in Ruby and I’ve
just learned of the fact that Ruby allocates a minimum heap of

Is there anything I need to be wary of if reducing this to something
much smaller, like say between 512-1024kbytes?

I think that minimum heap size is causing me problems in my Arm-WinCE
environment where we get approx 38000-40000kbytes to use from the
initial 64megabytes, once the OS and framebuffer has taken its share.


On Sat, Mar 1, 2008 at 7:38 PM, John S. [email protected]


In the gc.c file you’ll find:

#if defined(MSDOS) || defined(human68k)
#define GC_MALLOC_LIMIT 200000
#define GC_MALLOC_LIMIT 8000000

You may try playing with that number. Warning: I know almost nothing
about ruby internals,
so I won’t tell you the possible consequences, nor the sensible lower
bound for the number.