summaryrefslogtreecommitdiff
path: root/memory-take
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-10-20 18:23:15 +0200
committerPatrick Simianer <p@simianer.de>2016-10-20 18:23:15 +0200
commit0cb8b41406452c17ebcb6801e45cf114e46187fa (patch)
tree1f9b953c2ff800fb3fdf8e238d570c14c38b7af5 /memory-take
parent281872317a9ac5d4d62e6a6a2f5463cd20c65087 (diff)
memory stuff
Diffstat (limited to 'memory-take')
-rwxr-xr-xmemory-take18
1 files changed, 18 insertions, 0 deletions
diff --git a/memory-take b/memory-take
new file mode 100755
index 0000000..57289a5
--- /dev/null
+++ b/memory-take
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import sys
+import time
+
+if len(sys.argv) != 2:
+ print "usage: fillmem <number-of-megabytes>"
+ sys.exit()
+
+count = int(sys.argv[1])
+
+megabyte = (0,) * (1024 * 1024 / 8)
+
+data = megabyte * count
+
+while True:
+ time.sleep(1)
+