run this like a user, not root #include <stdio.h> #include <stdlib.h> main() { void *buf[2048]; long int mem = 0x3000000; int i = 0; for(;;){ printf("%lX\n", mem); buf[i] = malloc(mem); if (buf[i] == NULL) mem /= 2; else{ memset(buf[i], i, mem); i++; } if(mem < 1){ sleep(1); mem = 0x20000; } } getchar(); }
Assigned to dledford
Set resource limits for your users; this is normal behavior.