Skip to content

Instantly share code, notes, and snippets.

@andreaseger
Created January 20, 2021 15:40
Show Gist options
  • Save andreaseger/f7aa1eeacad3516728cece638c27f16c to your computer and use it in GitHub Desktop.
Save andreaseger/f7aa1eeacad3516728cece638c27f16c to your computer and use it in GitHub Desktop.
memory example
#!/usr/bin/env ruby
@list = []
allocate_memory = 50
Thread.new {
counter = 0
loop do
if counter > 15
@list = []
counter = 0
sleep(1)
else
@list << "\x00" * allocate_memory*1024*1024
end
counter += 1
end
}.join
sleep(99999)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment