TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Line-by-line memory usage of a Python program

130 点作者 vgnet大约 13 年前

4 条评论

lclarkmichalek大约 13 年前
Pretty sure forking a process every line is not the most efficient way to do this :) But nether the less, very cool
评论 #3888800 未加载
评论 #3888340 未加载
beambot大约 13 年前
Cool. I didn't know that you could get a representation of a function's code through func_name.func_code. That's pretty slick!
评论 #3888628 未加载
评论 #3888098 未加载
评论 #3888045 未加载
a235大约 13 年前
Really neat solution, useful for straightforward things. However, it's quite far from telling us the full truth. Python won't release memory instantly and there will be some free memory that can be reused but won't ever be reused (int arrays?)
andreasvc大约 13 年前
Another Python memory profiler: <a href="http://guppy-pe.sourceforge.net/#Heapy" rel="nofollow">http://guppy-pe.sourceforge.net/#Heapy</a>