1、计算内存地址:
str1 = 'shn'
print id(str1)
2、计算内存大小,返回字节数
str1 = 'td'
print sys.getsizeof(str1)
3、
文章标签 python内存诊断 内存地址 字节数 其他 文章分类 代码人生
1、计算内存地址:
str1 = 'shn'
print id(str1)
2、计算内存大小,返回字节数
str1 = 'td'
print sys.getsizeof(str1)
3、
上一篇:ImportError: No module named _curses;Color support is disabled, python-curses is not installed.解决办法
下一篇:gdb生成的core文件位置
很有可能造成内存溢出,方法名找到后去看源代码,告诉开发哪里写的不合理,如果不懂代码也可以
过多...
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M