diff options
Diffstat (limited to '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) + |