Skip to content

Instantly share code, notes, and snippets.

@scruffyfox
Created January 8, 2016 11:49
Show Gist options
  • Save scruffyfox/7d16f4cef0d320526805 to your computer and use it in GitHub Desktop.
Save scruffyfox/7d16f4cef0d320526805 to your computer and use it in GitHub Desktop.
// Usage: gcc memoryleak.c -o memoryleak; ./memoryleak
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
for (;;)
{
malloc(1);
}
return(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment