Skip to content Skip to sidebar Skip to footer

Real Memory Vs Profiled Memory Python

Using memory_profiler to aid in project that is requiring freeing up some memory at various points. The development environment is OS X snow leopard. The profiled memory, as shown

Solution 1:

In the line-by-line report, memory_profiler measures the memory usage after the execution of each line. In the memory peaks inside a function, e.g inside make_objects but the memory is released before the function returns, then memory_profiler will not report that usage.

Workarounds include decorating also the nested functions (e.g. make_objects) or using mprof (distributed with memory_profiler) to report memory usage as a function of time.

Post a Comment for "Real Memory Vs Profiled Memory Python"