Created
June 24, 2017 05:40
-
-
Save RantyDave/c2322891f86f26f4696b3a8b3a478b62 to your computer and use it in GitHub Desktop.
Incrementally allocating memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
base_alloc = bytearray(int(sys.argv[1])*1024*1024*1024) | |
extensions = [] | |
while True: | |
print("Append 128MB") | |
sys.stdin.readline() | |
extensions.append(bytearray(128*1024*1024)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment