Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python module memory usage [duplicate]

Tags:

python

memory

I have this python module that imports many other modules. On monitoring the vm usage of the module, I see the usage continuously growing. I tried to go through the whole code and assigned None to the objects\variables whereever possible. But I suspect there still could be something that is not freeing up the memory. Is there a way (through some 3rd party module or something) to view undisposed objects or their memory consumption?

Thanks!!

like image 283
Rinks Avatar asked Oct 20 '25 03:10

Rinks


1 Answers

Check out How do I profile memory usage in Python? and Which Python memory profiler is recommended?. You need to dig into the docs, but those tools will allow you to breakdown memory usage by module.

like image 170
Bialecki Avatar answered Oct 21 '25 17:10

Bialecki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!