I have a program that contains a large number of objects, many of them Numpy arrays. My program is swapping miserably, and I\'m trying to reduce the memory usage, because it
Have you tried valgrind
with the massif
tool?
valgrind --tool=massif python yourscript.py
it will create a file called massif.out.xxx
which you can inspect via
ms_print massif.out.xxx | less
it has all kinds of useful information, but the plot right in the beginning should be what you're looking for. Also check out massif tutorial on the valgrind homepage.
Using valgrind
is quite advanced and there might be easier ways to do what you're looking for.