#include #include #define SIZE (100 * 1024 * 1024) #define REPEAT (1024 * 1024) int main() { char *mem = malloc(SIZE); if (!mem) { printf("out of mem\n"); return 1; } for (int i = 0; i < REPEAT; i++) { int x = rand() / SIZE; mem[x] = 0; } return 0; }