python内存分析

时间:2019-08-30 23:20:50   收藏:0   阅读:102
@profile()
def call():
    a = list()
    for i in range(10000 * 100):
        a .append(i)

运行call后的输出:
Line # Mem usage Increment Line Contents
================================================
283 40.1 MiB 40.1 MiB @profile
284 def call():
285 40.1 MiB 0.0 MiB a = list()
286 44.1 MiB 0.0 MiB for i in range(10000 * 10):
287 44.1 MiB 0.3 MiB a .append(i)

原文:https://www.cnblogs.com/bryant24/p/11437479.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!