Artificially creating memory usage in Python
<p>I'm trying to create a pure memory intensive script in Python for testing purposes but every script that I try also increases my cpu. I've read <a href="https://stackoverflow.com/questions/30509322/how-to-implement-a-memory-intensive-python-script-for-test">this post</a> and I also tried, among others:</p>

<pre><code>#!/usr/bin/python
from datetime import datetime
startTime = datetime.now()

l1 = [17]*900
l2=[]

j=0
while j&lt;9000:
    l2=l1
    j=j+1
print "Finished in ", datetime.now() - startTime
</code></pre>

<p>in order to copy an array to another array but once again I had cpu variations as well. </p>

<p><strong>UPDATED</strong>
So, how can I cause a standard cpu utilization (100% usage in one core), 45% of memory utilization and after a couple of minutes an increase of memory utilization to 90%?</p>