Last active
July 4, 2024 01:41
-
-
Save oknauta/3817c8e86235d37b45e323a534fb3270 to your computer and use it in GitHub Desktop.
Creating GARBAGE in memory using C!
This file contains 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
// File: bad_malloc.c | |
// Date: 2024-05-21 | 2024-07-03 | |
#include <stdlib.h> // Library to malloc | |
#include <stdbool.h> // Library to bool | |
int main() | |
{ | |
while(true) // Loop to create the garbage. | |
{ | |
malloc(1); // This crates the garbage. | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment