Print Total Memory Used by a Python Process 发表于 2021-12-29 更新于 2024-08-22 分类于 Python 文章标准 暂无 Here is a useful solution that works for various operating systems, including Linux, Windows, etc.: import psutilprocess = psutil.Process()print(process.memory_info().rss) # in bytes