#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project      : MeUtils.
# @File         : memory_profiler_demo
# @Time         : 2021/1/25 1:25 下午
# @Author       : yuanjie
# @Email        : <EMAIL>
# @Software     : PyCharm
# @Description  : 

from memory_profiler import profile

@profile
def my_func():
    a = [1] * (10 ** 6)
    b = [2] * (2 * 10 ** 7)
    del b
    return a

if __name__ == '__main__':
    my_func()

# mprof run <script>
# mprof plot


#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project      : MeUtils.
# @File         : memory_profiler_demo
# @Time         : 2021/1/25 1:25 下午
# @Author       : yuanjie
# @Email        : <EMAIL>
# @Software     : PyCharm
# @Description  : 

from memory_profiler import profile

@profile
def my_func():
    a = [1] * (10 ** 6)
    b = [2] * (2 * 10 ** 7)
    del b
    return a

if __name__ == '__main__':
    my_func()

# mprof run <script>
# mprof plot


#!/usr/bin/env python # -*- coding: utf-8 -*- # @Project      : MeUtils. # @File         : memory_profiler_demo # @Time         : 2021/1/25 1:25 下午 # @Author       : yuanjie # @Email        : <EMAIL> # @Software     : PyCharm # @Description  : # mprof run <script> # mprof plot