Gambit startup: "free memory is now less than 20%..." -- crash
Apparently, Gambit checks for "free" memory, disregarding the fact that "cached" memory can be counted as "free" because the OS will empty the cache (write its content to the hard disk) and provide the memory, like it had been free, to the application requesting it.
Consequently, to run Gambit, you must once allocate a sufficient amount of memory manually, so that it is taken from the "cached" category, and then make it available for Gambit.
To do that, first compile the attached C source code: paste it into a file "lim.c" and issue the command "cc -o lim lim.c".
Next, set some limit:
% limit vmemoryuse 16000m
% ulimit -v 16000000
The number you use should represent about 25% of the physical memory of your machine.
It will count up to the amount of memory allowed by the limit. (If, for some reason, it counts on beyond that value, make sure you abort it as quickly as possible (press <Ctrl-C>).
After these preparations, you should be able to run Gambit!
/* lim.c */
struct rlimit rlim;
printf("%s limit:n%20d soft limitn%20d hard limitn",
main(int argc,char **argv)
#define ONE_MEG 1048576
int n = 1;
if (argc > 1)
n = atoi(argv);
if (n < 1 || n > 100000)
n = 1;
size = ONE_MEG*n;
register char *s,*t;
printf("nAllocation Chunk = %d MBn", n);
for(M=0; (s = malloc(size)) != 0; ++M)
for (t = s+size; t > s; t-=1000)
*t = 'x';
printf("nAble to grab %d MBn",M*n);