From stack overflow I found :
a = []
while True:
print len(a)
a.append(' ' * 10**6)
But this ate up memory so quickly in real world memory pressure happens due to slow leakage in memory. I do not have any stress tool access. I tried doing dd if , but I could not see any spikes in /proc/pressure/memory
This assignment is so interesting for me but I am stuck with how to implement real time memory pressure to study the trend of /proc/pressure/memory