We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 296b9ee commit 9f3a397Copy full SHA for 9f3a397
DrEden33773/README.md
@@ -0,0 +1,18 @@
1
+# Amazing-OOM-RS
2
+
3
+## Introduction
4
5
+An extremely short executable rust implementation to f\*\*k the memory up.
6
7
+## Code
8
9
+```rust
10
+fn main(){loop{Box::leak(0.into());}}
11
+```
12
13
+## Reason
14
15
+1. `0.into()` simply generates a unique pointer with a clean ownership
16
+2. `Box::leak()` simply forgets the input unique pointer's ownership, turning it into a raw pointer
17
+3. Each time you leak a unique pointer, you don't give a try to free/drop it's load on heap memory
18
+4. `loop{}` means this program will continue to be executed until all of the memory have been f\*\*ked up
DrEden33773/htop.png
3.07 MB
DrEden33773/main.rs
@@ -0,0 +1 @@
0 commit comments