diff --git a/DrEden33773/README.md b/DrEden33773/README.md new file mode 100644 index 0000000..4166a5e --- /dev/null +++ b/DrEden33773/README.md @@ -0,0 +1,18 @@ +# Amazing-OOM-RS + +## Introduction + +An extremely short executable rust implementation to f\*\*k the memory up. + +## Code + +```rust +fn main(){loop{Box::leak(0.into());}} +``` + +## Reason + +1. `0.into()` simply generates a unique pointer with a clean ownership +2. `Box::leak()` simply forgets the input unique pointer's ownership, turning it into a raw pointer +3. Each time you leak a unique pointer, you don't give a try to free/drop it's load on heap memory +4. `loop{}` means this program will continue to be executed until all of the memory have been f\*\*ked up diff --git a/DrEden33773/htop.png b/DrEden33773/htop.png new file mode 100644 index 0000000..e10033d Binary files /dev/null and b/DrEden33773/htop.png differ diff --git a/DrEden33773/main.rs b/DrEden33773/main.rs new file mode 100644 index 0000000..bf5eeb5 --- /dev/null +++ b/DrEden33773/main.rs @@ -0,0 +1 @@ +fn main(){loop{Box::leak(0.into());}}