From: khaines@... Date: 2008-04-16T23:14:38+09:00 Subject: Re: ruby memory allocation On Wed, 16 Apr 2008, Emanuele Ricci wrote: > I just discovered that ruby allocates memory in 8Mb chunks. > Forgive my ignorance. > Is there a way to change this behaviour? Since my app runs in an > environment with very strict memory constraints, a memory spike of 8Mb > can be lethal... > I would change it to a lower figure. In the Ruby source, in gc.c: #ifndef GC_MALLOC_LIMIT #if defined(MSDOS) || defined(__human68k__) #define GC_MALLOC_LIMIT 200000 #else #define GC_MALLOC_LIMIT 8000000 #endif #endif Start there. Kirk Haines