Skip to content

Commit

Permalink
Add script to sway all your memory in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nonchris committed May 2, 2022
1 parent e49851b commit 1b238cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fun/memory-goes-brrr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
""" A short but effective way to allocate all your memory :) """

x = [42]

# simply append all values of x in each iteration over the next element of x
# x will grow exponentially and the for-loop will never end - beautiful
for i in x:
x.extend(x)

0 comments on commit 1b238cc

Please sign in to comment.