#include using namespace std; /** * A very poorly written program that exhausts memory. * Wait for it and it should exit or at least start printing the null pointer. */ int main() { for (int i=0;;i++) { int *ptr = new int; if (i % 1000000 == 0) { cout << i << ": " << ptr << endl; } } }