cmd.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:esp8266 作者: fadushin 项目源码 文件源码
def mem(level=None):
    import gc
    mem_alloc = gc.mem_alloc()
    mem_free = gc.mem_free()
    capacity = mem_alloc + mem_free
    print("    capacity\tfree\tusage")
    print("    {}\t{}\t{}%".format(capacity, mem_free, int(
        ((capacity - mem_free) / capacity) * 100.0)))
    if level:
        import micropython
        micropython.mem_info(level)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号