If people want to reproduce this, my memory eater produces "Unable to load
interpreter" fairly often. I noticed but ignored the problem during my
investigations leading to my recent "No swap => pathological paging" post.
For completeness I've attached the program to the end again since it is small.
Run the program in "slow mode" (e.g. with the sleep enabled) if you actually
want to be able to see anything. Adjust the counter value to slightly before
all virtual memory should be exhausted.
---------------------------------------------------------------------------
Tim Hollebeek | Disclaimer :=> Everything above is a true statement,
Electron Psychologist | for sufficiently false values of true.
Princeton University | email: tim@wfn-shop.princeton.edu
----------------------| http://wfn-shop.princeton.edu/~tim (NEW! IMPROVED!)
#include <stdio.h>
#include <stdlib.h>
double **new_matrix(int n) {
double **ret = (double **)malloc(n * sizeof(double *));
int i;
for (i = 0; i < n; i++)
ret[i] = (double *)malloc(n*sizeof(double));
return ret;
}
int main() {
double **m = new_matrix(3300);
int i, j;
for (i = 0; i < 3300; i++) {
for (j = 0; j < 3300; j++) {
m[i][j] = 1;
}
printf("%d\n", i);
fflush(0);
/* if (i > 1650) sleep(5); */
}
}