[racket] Limit command-line Racket's memory
At Mon, 13 Jun 2011 17:54:17 -0400, Tony Garnock-Jones wrote:
> I've changed the build script, and now 3M Racket seems to be working on
> the MIPS machine!
Great!
I'll look at your patches more soon. In cross-compiling mode, probably
`configure' should just use whatever `racket' is installed rather than
a specific path to some `rakcetcgc'.
> It seems to be using even more memory than the Boehm variant, though :-/
I'm not too surprised, but I think that using 3m at least puts us in
better shape to improve things...
> Any pointers to interesting knobs for tuning 3m's behaviour?
The "newgc.c" file has
#define GEN0_INITIAL_SIZE (1 * 1024 * 1024)
#define GEN0_SIZE_FACTOR 0.5
#define GEN0_SIZE_ADDITION (512 * 1024)
#define GEN0_MAX_SIZE (32 * 1024 * 1024)
#define GEN0_PAGE_SIZE (1 * 1024 * 1024)
You can start by adjusting with those numbers, especially the
GEN0_SIZE_FACTOR value (lower should trigger GCs more frequently) and
the GEN0_MAX_SIZE value.