File: cacheout.py

package info (click to toggle)
pytables 3.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,272 kB
  • sloc: ansic: 82,216; python: 65,569; cpp: 753; sh: 394; makefile: 106
file content (13 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Program to clean out the filesystem cache
import numpy as np

a = np.arange(1000 * 100 * 125, dtype="f8")  # 100 MB of RAM
b = a * 3  # Another 100 MB
# delete the reference to the booked memory
del a
del b

# Do a loop to fully recharge the python interpreter
j = 2
for i in range(1000 * 1000):
    j += i * 2