📅  最后修改于: 2022-03-11 14:47:18.701000             🧑  作者: Mango
import os
import psutil
pid = os.getpid()
py = psutil.Process(pid)
memoryUse = py.memory_info()[0]/2.**30 # memory use in GB...I think
print('memory use:', memoryUse)