How to get the amount of memory which has been used by a single process in windows platform with psutil library? (I dont want to have the percentage , I want to know the amount in bytes)
We can use:
psutil.virtual_memory().used
To find the memory usage of the whole OS in bytes, but how about each single process?
Thanks,
Call
memory_info_ex
:The working set includes pages that are shared or shareable by other processes, so in the above example it's actually larger than the paging file commit charge.
There's also a simpler
memory_info
method. This returnsrss
andvms
, which correspond towset
andpagefile
.For another example, let's map some shared memory.
The mapped pages get demand-zero faulted into the working set.
A private copy incurs a paging file commit charge: