2kai2kai2 / VSCode-Python-Resource-Monitor

A Visual Studio Code extension for viewing resource consumption of Python programs in the debugger.
https://marketplace.visualstudio.com/items?itemName=kaih2o.python-resource-monitor
GNU General Public License v3.0
17 stars 5 forks source link

Memory Usage not working on MacBook M2 Pro #22

Closed FarukBuldur closed 2 months ago

FarukBuldur commented 7 months ago
image
2kai2kai2 commented 7 months ago

Yes, this is a known issues with Mac. Unfortunately, it is (technically) correct, since if you go to your activity monitor, you will get the same number. The reason seems to be that it allocates a large amount of virtual memory (I think using disk space it is the address space), which never actually gets used.

image

However, in the future, I would like to add options to control or separate the view of virtual and physical memory (or the equivalents on each operating system)

2kai2kai2 commented 7 months ago

Actually, I think it might be best just to exclude all virtual memory. I don't know for sure how accurate that will be, but it is a lot more useful to be looking at things affected by memory pressure.

shahargl commented 2 months ago

any workaround for that?

2kai2kai2 commented 2 months ago

Hi, I've finally gotten around to finishing this fix. The newest version v0.3.0 should not use the resident/working set size for memory (basically only what is in physical RAM), eliminating the bloated size from virtual memory or address space. My testing on MacOS now shows the expected values.

FarukBuldur commented 2 months ago

Great to hear, thanks a lot.