1import asyncio
2
3from memory_profiler import profile
4
5
6@profile
7@asyncio.coroutine
8def my_func():
9    a = [1] * (10 ** 6)
10    b = [2] * (2 * 10 ** 7)
11    yield from asyncio.sleep(1e-2)
12    del b
13
14
15if __name__ == '__main__':
16    loop = asyncio.get_event_loop()
17    loop.run_until_complete(my_func())
18