diff options
author | Patrick Simianer <p@simianer.de> | 2016-08-18 10:23:25 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-08-18 10:23:25 +0200 |
commit | a977081422703c165508904fffd04068c7170f97 (patch) | |
tree | b2d26a19d42135814118d0b842154008ccc6a9ff | |
parent | 54d271fef2d3ba1b1ba87d6a40f4bf53e2e0d4f6 (diff) |
take-mem
-rwxr-xr-x | take-mem | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/take-mem b/take-mem new file mode 100755 index 0000000..57289a5 --- /dev/null +++ b/take-mem @@ -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) + |