Das dürfte dir helfen:
import os, psutil
process = psutil.Process(os.getpid())
print(process.memory_info().rss)
Wenn du das einfach z.B. als Funktion hinzufügst am ende oder mittendrin und dann einmal nachguckst wie viel dein Programm zieht (Angabe in Bytes).
Quelle: https://stackoverflow.com/questions/938733/total-memory-used-by-python-process