

The total memory usage at any time will be displayed in the Mem usage column and increment in memory usage due to the execution of a particular statement in the Increment column.

It shows two columns named Mem usage and Increment next to each line of function which is decorated with We can see that it starts with some memory and then increases memory as arrays are created and decrease memory as an array are deallocated. The output generated using the memory profiler is very self-explanatory. memory_profiler ¶ġ098330 Filename : example1. It can be easily installed using pip/conda. It's built on top of psutil module of python. It's work almost like line_profiler which profiles time.


This is the reason we generally do no monitor primary memory usage. With the rise in the primary memory of computer systems, we generally do not run out of memory. How to Profile Memory Usage in Python using memory_profiler? ¶
